Documentation ¶
Overview ¶
[SIKE] http://www.sike.org/files/SIDH-spec.pdf [REF] https://github.com/Microsoft/PQCrypto-SIDH
Index ¶
- Variables
- func Decapsulate(prv *PrivateKey, pub *PublicKey, ctext []byte) ([]byte, error)
- func Decrypt(prv *PrivateKey, ctext []byte) ([]byte, error)
- func Encapsulate(rng io.Reader, pub *PublicKey) (ctext []byte, secret []byte, err error)
- func Encrypt(rng io.Reader, pub *PublicKey, ptext []byte) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
var F = []byte{0x02, 0x00}
var G = []byte{0x00, 0x00}
Constants used for cSHAKE customization Those values are different than in [SIKE] - they are encoded on 16bits. This is done in order for implementation to be compatible with [REF] and test vectors.
var H = []byte{0x01, 0x00}
Functions ¶
func Decapsulate ¶
Decapsulate given the keypair and ciphertext as inputs, Decapsulate outputs a shared secret if plaintext verifies correctly, otherwise function outputs random value. Decapsulation may fail in case input is wrongly formated. Constant time for properly initialized input.
func Decrypt ¶
Uses SIKE private key to decrypt ciphertext. Returns plaintext in case decryption succeeds or error in case unexptected input was provided. Constant time
func Encapsulate ¶
Encapsulation receives the public key and generates SIKE ciphertext and shared secret. The generated ciphertext is used for authentication. The rng must be cryptographically secure PRNG. Error is returned in case PRNG fails or wrongly formated input was provided.
Types ¶
This section is empty.