abla/crypto/p384/core
Generated from source.
Source module; follow its importing module's re-export links.
Source: abla/crypto/p384/core.ab
p384InRange (fun)
trusted fun p384InRange(order: int, value: int): u32
Nonzero when the twelve limbs at value are a number from 1 to n-1, n at order: every limb is read, and only the verdict is public (a key that is refused). A word, not a bool: a comparison here would be a branch on a target with no conditional set.
p384ScalarMultiplySecret (fun)
trusted fun p384ScalarMultiplySecret(f: int, work: int, out: int, point: int, scalar: int): void
out = scalar * point: scalar is twelve plain limbs (secret), point projective in Montgomery form, and out is neither. Every window of four bits does the same four doublings, one addition and a read of the whole table of sixteen multiples.
p384MultiplyPlain (fun)
trusted fun p384MultiplyPlain(m: BnModulus, out: int, a: int, b: int): void
out = a `b` mod the modulus, all plain (the ECDSA signature: r d, and s = (e + r d) * k^-1: d and k^-1 are secret).
p384MultiplyPlainBody (fun)
@inline trusted fun p384MultiplyPlainBody(memory: int, out: int, a: int, b: int, encoded: int): void
What p384MultiplyPlain does, on a modulus block at memory and a work area of twelve limbs.
P384Curve (class)
class P384Curve(val field: BnModulus, val order: BnModulus, val work: int)
Holds the P-384 field and scalar moduli and an operation's scratch storage.
p384IsValidPublicKey (fun)
trusted fun p384IsValidPublicKey(encoded: string): bool
Whether encoded is an uncompressed point of the curve.
p384PublicKey (fun)
trusted fun p384PublicKey(privateKey: string): CryptoResult
The public key, 97 bytes (0x04 || X || Y), of a private key of 48 bytes.
p384Ecdh (fun)
trusted fun p384Ecdh(privateKey: string, peerPublicKey: string): CryptoResult
ECDH: the x coordinate, 48 bytes, of privateKey times the peer's public point. The peer's point is checked (a point of the curve: the group has cofactor 1, so that is all there is to check); a private key out of range is refused.
p384EcdsaSignRaw (fun)
trusted fun p384EcdsaSignRaw(privateKey: string, message: string): CryptoResult
ECDSA over SHA-384 (RFC 6979 nonce, so a message always gets the same signature): the 96 bytes r || s.
p384SignatureToDer (fun)
fun p384SignatureToDer(raw: string): string
The signature r || s (96 bytes) as DER, the form X.509 and TLS carry.
p384EcdsaSign (fun)
trusted fun p384EcdsaSign(privateKey: string, message: string): CryptoResult
ECDSA over SHA-384, the signature as DER.
p384EcdsaVerifyDigestRaw (fun)
trusted fun p384EcdsaVerifyDigestRaw(publicKey: string, digest: string, signature: string): bool
Verifies the signature r || s (96 bytes) of a message digest (the leftmost 384 bits of a longer one count) under the public key (97 bytes).
p384SignatureFromDer (fun)
fun p384SignatureFromDer(der: string): string
r || s (96 bytes) from a strict DER ECDSA signature, or "".
p384EcdsaVerify (fun)
trusted fun p384EcdsaVerify(publicKey: string, message: string, signature: string): bool
ECDSA over SHA-384 with a strict DER signature.
Built from Abla v0.2.79 source ba5d6b7d. Examples and generated signatures follow that source revision.