Jump to content

Elliptic Curve Cryptography

  • You cannot reply to this topic
No replies to this topic

#1 PG23186706924

  • Members
  • 4 posts

Posted 09 April 2019 - 11:59 PM

Hey it's me again. I'm back with another approach to public key cryptography, elliptic curve cryptography. ECC has smaller keys and is faster than RSA and regular Diffie-Hellman. This API implements the ECDH key exchange, EdDSA-like digital signatures, a pseudorandom byte generator as well as authenticated symmetric cryptography.

Byte Array Format

Elliptic Curve Functions Usage

Authenticated Encryption Usage

Random Usage

Authenticated Encryption - Proper Usage of Encryption
Authenticated Encryption means only messages that have been encrypted with the key will be decrypted without an error in the decryption function, this means messages cannot be modified when intercepted (regular symmetric encryption does not grant this).

Replay Attacks
Authenticated encryption preventing modifying ciphertexts doesn't mean an attacker can't send a valid ciphertext twice or delay a sent ciphertext for some time. This can lead to undesirable consequences such as a second bank transfer or a delay in a message to a door lock program. Protection against replay attacks require more intricate APIs that deal with sending messages directly and other things such as nonces, timestamps or counters. Replay attack protection is outside of the scope of this API.

Other Functions
Finally, the API also includes (and makes use of) Anavrins' ChaCha20 and SHA-256.

Note: you must either use dofile or require when loading the API.
Pastebin: ZGJGBJdg

Edited by PG23186706924, 25 April 2019 - 12:04 AM.

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users