Add details on ISAAC cipher

This commit is contained in:
PureCS 2018-07-03 06:58:32 -07:00
parent 2f7502f346
commit 193f6c119c
2 changed files with 24 additions and 1 deletions

22
src/ISAAC-cipher.md Normal file
View File

@ -0,0 +1,22 @@
# ISAAC cipher
ISAAC is a cryptographically secure pseudorandom number generator, and a stream cipher designed by Robert J. Jenkins Jr (see [ISAAC](http://burtleburtle.net/bob/rand/isaacafa.html)).
You can find the standard Java implementation used [here](https://github.com/PureCS/rs317-client/blob/master/src/com/runescape/client/io/ISAACCipher.java).
## ISAAC instance creation
When a client logs into the server, two instances of ISAAC are created,
and the generated seeds are transmitted between them.
One instance is for encryption, and one for decryption.
The seed is comprised of 128-bits, half is generated by the client, and
half by the server.
This is to ensure that no individual entity has entire control of
the key generation process.
## Use in the client
ISAAC is used to encrypt and decrypt packet opcodes before transmission, to make packet manipulation harder.
When a packet is sent, its opcode becomes the original opcode added to the generated ISAAC opcode from the encryption instance.
The packet opcode is decrypted analogously on the server.

View File

@ -8,7 +8,8 @@
- [DMCA policy](./DMCA-policy.md)
- [Privacy policy](./Privacy-policy.md)
- [Data](./Data.md)
- [Data-Types](./Data-Types.md)
- [Data-types](./Data-Types.md)
- [ISAAC cipher](./ISAAC-cipher.md)
- [Word](./Word.md)
- [DWord](./DWord.md)
- [QWord](./QWord.md)