Graham
71b1ac8e20
Rename XteaKey to SymmetricKey
...
It's now used for both XTEA and ISAAC keys, and there's nothing
XTEA-specific about it so there's no need to duplicate it.
Signed-off-by: Graham <gpe@openrs2.org>
8 months ago
Graham
4ac91e4f29
Move XteaKey to its own file
...
Signed-off-by: Graham <gpe@openrs2.org>
8 months ago
Graham
651b2f8b5f
Update Guice
...
Signed-off-by: Graham <gpe@openrs2.org>
8 months ago
Graham
483a8a0f16
Support arrays larger than 2**29 in Whirlpool implementation
...
Signed-off-by: Graham <gpe@openrs2.org>
9 months ago
Graham
bba220aebc
Add SHA-1 extension method to ByteBuf
...
Similar to the existing Whirlpool extension method.
Signed-off-by: Graham <gpe@openrs2.org>
9 months ago
Graham
650e298bc9
Add CREATE_ACCOUNT packet
...
Signed-off-by: Graham <gpe@openrs2.org>
2 years ago
Graham
03e6c3dd81
Annotate crypto methods with @Jvm{Overloads,Static}
...
Signed-off-by: Graham <gpe@openrs2.org>
2 years ago
Graham
cf6e7cf8e7
Add methods for reading RSA keys from memory
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
7eae597892
Move RsaKeyProvider to the config module
...
I think this makes more sense, as we're loading it from the etc
directory, just like etc/config.yaml, and it isn't required by most of
the users of the crypto module.
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
b37e4d0d0b
Use alternatives for most methods deprecated in Kotlin 1.5
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
3d09c4d90a
Make XteaKey a data class
...
It needs a hashCode/equals implementation as it's used in sets.
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
31db959a46
Add XteaKeyDeserializer
...
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
46b311c5ad
Add XteaKey Jackson serializer
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
f1c3c65811
Use upper case hex digits in golden ratio constant
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
1e3257acf7
Use consistent case for Unicode escapes in the Whirlpool S-box
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
f90b9df505
Replace Paths.get() with Path.of()
...
Paths.get() may be deprecated in a future release.
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
c70cfcfb30
Add ByteBuf.whirlpool() extension method
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
6f815b6334
Move return outside try block
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
a86f000f88
Add StreamCipher interface and a NopStreamCipher implementation
...
This will allow us to replace IsaacRandom in the future Netty
encoders/decoders with an implementation suitable for use in a unit
test.
Signed-off-by: Graham <gpe@openrs2.org>
4 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