Graham
cf6e7cf8e7
Add methods for reading RSA keys from memory
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
5e6afb88f6
Improve RSA method naming
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
98d25539b9
Combine RSA encrypt and decrypt methods into a single crypt method
...
This allows us to speed up master index signing with the CRT.
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
ed7eb10411
Relax isPrivate checks in the encrypt/decrypt methods
...
The master index uses RSA signatures in some builds. As such, we need to
be able to encrypt with a private key and decrypt with a public key.
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
e9e7b7848d
Add constant for the RSA magic byte
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
f143eef142
Move Kotlin files from src/{main,test}/java to src/{main,test}/kotlin
...
Signed-off-by: Graham <gpe@openrs2.org>
4 years ago
Graham
ce5b76ef0f
Rename dev.openrs2 package to org.openrs2
...
Signed-off-by: Graham <gpe@openrs2.org>
4 years ago
Graham
232ba32bbd
Enable explicit API mode
...
This already caught some cases of public members that should have been
private and one case where the inferred type was too specific.
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
8370ad104e
Write files atomically
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
177326221f
Move cryptographic code to a separate module
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
efa9c90f57
Replace shelling out to keytool with Bouncy Castle and the security API
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
cf132cb2dd
Rename KEY_LENGTH to CLIENT_KEY_LENGTH
...
Signed-off-by: Graham <gpe@openrs2.dev>
4 years ago
Graham
2fa55b3ce1
Add length parameter to Rsa.generateKeyPair()
4 years ago
Graham
06de9d1449
Replace if/throw with check() in the Rsa object
4 years ago
Graham
0bb0d1a5b6
Return RSAPrivateCrtKeyParameters from readPrivateKey
4 years ago
Graham
531db3159e
Replace hasArray() and array() logic with ByteBufUtil.getBytes()
4 years ago
Graham
db11c5536d
Add publicKey property test
4 years ago
Graham
6b247cb0e1
Add ByteBuf extension methods for RSA encryption and decryption
4 years ago
Graham
0f767c86eb
Add textbook RSA encryption and decryption
4 years ago
Graham
101548e5b7
Add RSA key generation and I/O
4 years ago