Compare commits
	
		
			3 Commits
		
	
	
		
			e8837a0721
			...
			eb02693c1f
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| eb02693c1f | |||
| e3babcd6a9 | |||
| 54ccf6fa37 | 
							
								
								
									
										11
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,11 @@
 | 
			
		||||
kind: pipeline
 | 
			
		||||
name: default
 | 
			
		||||
 | 
			
		||||
pipeline:
 | 
			
		||||
  build:
 | 
			
		||||
    image: node
 | 
			
		||||
    environment:
 | 
			
		||||
      RASHA_TEST_LARGE_KEYS: 1
 | 
			
		||||
    commands:
 | 
			
		||||
      - npm install --ignore-scripts
 | 
			
		||||
      - npm test
 | 
			
		||||
@ -1,10 +1,12 @@
 | 
			
		||||
[Rasha.js](https://git.coolaj86.com/coolaj86/rasha.js)
 | 
			
		||||
[Rasha.js](https://git.coolaj86.com/coolaj86/rasha.js) · [](https://strong-emu-11.telebit.io/jshaver/rasha.js)
 | 
			
		||||
=========
 | 
			
		||||
 | 
			
		||||
Sponsored by [Root](https://therootcompany.com).
 | 
			
		||||
Built for [ACME.js](https://git.coolaj86.com/coolaj86/acme.js)
 | 
			
		||||
and [Greenlock.js](https://git.coolaj86.com/coolaj86/greenlock.js)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| ~550 lines of code | 3kb gzipped | 10kb minified | 18kb with comments |
 | 
			
		||||
 | 
			
		||||
RSA tools. Lightweight. Zero Dependencies. Universal compatibility.
 | 
			
		||||
@ -16,6 +18,7 @@ RSA tools. Lightweight. Zero Dependencies. Universal compatibility.
 | 
			
		||||
* [ ] ECDSA
 | 
			
		||||
  * **Need EC or ECDSA tools?** Check out [Eckles.js](https://git.coolaj86.com/coolaj86/eckles.js)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Generate RSA Key
 | 
			
		||||
 | 
			
		||||
Achieves the *fastest possible key generation* using node's native RSA bindings to OpenSSL,
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										24
									
								
								test.sh
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								test.sh
									
									
									
									
									
								
							@ -137,20 +137,30 @@ echo ""
 | 
			
		||||
echo ""
 | 
			
		||||
echo "Re-running tests with random keys of varying sizes"
 | 
			
		||||
echo ""
 | 
			
		||||
rndkey 32 # minimum key size
 | 
			
		||||
rndkey 64
 | 
			
		||||
rndkey 128
 | 
			
		||||
rndkey 256
 | 
			
		||||
 | 
			
		||||
# commented out sizes below 512, since they are below minimum size on some systems.
 | 
			
		||||
# rndkey 32 # minimum key size
 | 
			
		||||
# rndkey 64
 | 
			
		||||
# rndkey 128
 | 
			
		||||
# rndkey 256
 | 
			
		||||
 | 
			
		||||
rndkey 512
 | 
			
		||||
rndkey 768
 | 
			
		||||
rndkey 1024
 | 
			
		||||
rndkey 2048 # first secure key size
 | 
			
		||||
#rndkey 3072
 | 
			
		||||
#rndkey 4096 # largest reasonable key size
 | 
			
		||||
echo "Pass"
 | 
			
		||||
 | 
			
		||||
if [  ${RASHA_TEST_LARGE_KEYS} ]; then 
 | 
			
		||||
  rndkey 3072
 | 
			
		||||
  rndkey 4096 # largest reasonable key size
 | 
			
		||||
else
 | 
			
		||||
  echo ""
 | 
			
		||||
  echo "Note:"
 | 
			
		||||
  echo "Keys larger than 2048 have been tested and work, but are omitted from automated tests to save time."
 | 
			
		||||
  echo "Set RASHA_TEST_LARGE_KEYS=0 to enable testing of keys up to 4096."
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
echo ""
 | 
			
		||||
echo "Pass"
 | 
			
		||||
 | 
			
		||||
rm fixtures/*.1.*
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user