(index ("define-ec-parameters" 0) ("brainpool-P160r1" 411) ("brainpool-P192r1" 411) ("brainpool-P224r1" 411) ("brainpool-P256r1" 411) ("brainpool-P320r1" 411) ("brainpool-P384r1" 411) ("brainpool-P512r1" 411) ("ec+" 967) ("ec-" 1193) ("ec*" 1491) ("on-elliptic-curve?" 1898) ("with-elliptic-curve" 2106) ("ecc-generate-keys" 2395) ("ecc-sign" 2859) ("ecc-verify" 3565) ("ecc-generate-secret" 4166))
(def (sig (syntax "(define-ec-parameters id p a b x y n h)" (id define-ec-parameters))) (p "A shorthand for") (pre " (define id\n   (make-ec-parameters\n    p: (string->number p 16)\n    a: (string->number a 16)\n    b: (string->number b 16)\n    G: (make-rectangular\n        (string->number x 16)\n        (string->number y 16))\n    n: (string->number n 16)\n    h: (string->number h 16)\n    name: 'id))"))
(def (sig (constant "brainpool-P160r1" (id brainpool-P160r1)) (constant "brainpool-P192r1" (id brainpool-P192r1)) (constant "brainpool-P224r1" (id brainpool-P224r1)) (constant "brainpool-P256r1" (id brainpool-P256r1)) (constant "brainpool-P320r1" (id brainpool-P320r1)) (constant "brainpool-P384r1" (id brainpool-P384r1)) (constant "brainpool-P512r1" (id brainpool-P512r1))) (p "Constants for standardized elliptic curves suitable for cryptographic use. Refer to the " (link "http://www.ecc-brainpool.org/" "ECC Brainpool") " site for more information."))
(def (sig (procedure "((ec+ parameters) P ...)" (id ec+))) (p "Computes the sum of the points " (tt "P") " on the elliptic curve specified by the given " (tt "parameters") ", similar to the standard procedure " (tt "+") "."))
(def (sig (procedure "((ec- parameters) A P ...)" (id ec-))) (p "Computes the difference of point " (tt "A") " and all points " (tt "P") " or the additive inverse of " (tt "A") " on the elliptic curve specified by the given " (tt "parameters") ", similar to the standard procedure " (tt "-") "."))
(def (sig (procedure "((ec* parameters) P n)" (id ec*))) (p "Computes the scalar product of point " (tt "P") " with the integer " (tt "n") " on the elliptic curve specified by the given " (tt "parameters") ", but does so much more efficiently than iteratively summing up copies of " (tt "P") ".") (p "If " (tt "n") " is negative, the additive inverse of " (tt "P") " is multiplied by " (tt "(abs n)") "."))
(def (sig (procedure "(on-elliptic-curve? parameters P)" (id on-elliptic-curve?))) (p "Checks whether the point " (tt "P") " is a member of the elliptic curve specified by the given " (tt "parameters") "."))
(def (sig (syntax "(with-elliptic-curve parameters body ...)" (id with-elliptic-curve))) (p "Overloads the symbols " (tt "+") ", " (tt "-") " and " (tt "*") " inside " (tt "body") " with versions operating on elements of the elliptic curve specified by the given " (tt "parameters") "."))
(def (sig (procedure "((ecc-generate-keys parameters random-integer))" (id ecc-generate-keys))) (p "Given elliptic curve " (tt "parameters") " and a cryptographically strong " (tt "random-integer") " generator for huge numbers with analoguous behaviour as the standard procedure " (tt "(random n)") ", a procedure is generated that returns a random new public key and private key. The public key is a point on the elliptic curve, the private key is an integer."))
(def (sig (procedure "((ecc-sign parameters random-integer) d message)" (id ecc-sign))) (p "Given elliptic curve " (tt "parameters") " and a cryptographically strong " (tt "random-integer") " generator for huge numbers with analoguous behaviour as the standard procedure " (tt "(random n)") ", a signature procedure is generated that computes a signature from the private key " (tt "d") " and the given " (tt "message") ".") (p "The message is a number and the signature is a pair of two numbers.") (p "For practical applications, you should convert some message digest into a number with the same bit length as the base point order of the elliptic curve and pass it as the " (tt "message") " argument."))
(def (sig (procedure "((ecc-verify parameters) P message signature)" (id ecc-verify))) (p "Given elliptic curve " (tt "parameters") ", a signature verification procedure is generated that checks a signature given the public key " (tt "P") " of the signer, the original " (tt "message") " and the " (tt "signature") ".") (p "The message is a number and the signature is a pair of two numbers.") (p "For practical applications, you should convert some message digest into a number with the same bit length as the base point order of the elliptic curve and pass it as the " (tt "message") " argument."))
(def (sig (procedure "((ecc-generate-secret parameters) d P)" (id ecc-generate-secret))) (p "Given elliptic curve " (tt "parameters") ", a shared secret generator is created that computes a shared secret given the secret key " (tt "d") " of the \"sender\" and the public key " (tt "P") " of the recipient.") (p "The shared secret is a point on the elliptic curve.") (p "For practical applications you should hash the returned point together with some strong random salt value to derive a key for symmetric encryption."))
