Library ec

To use this library in your code:

import crypto.ec
Support for Elliptic Curve (EC) public-key cryptography.
EC can be used for digital signatures (ECDSA) and key agreement (ECDH).
Examples
Signing and Verifying

import crypto.ec

// Assuming 'private-key' and 'public-key' are available as ec.EcKey.

message := "Hello world"
key := ec.EcKeyPair.generate --curve="secp256r1"
signature := key.sign message

if key.verify message signature:
  print "Signature is valid"
else:
  print "Signature is invalid"

Classes

Elliptic Curve Integrated Encryption Scheme (ECIES).

A pair of EC keys generated together.