SymCrypt¶
Primitives¶
Supports ECDH and ECDSA with NIST curves (192, 224, 256, 384, 521) and Twisted Edwards NUMS curves (NumsP256t1, NumsP384t1, NumsP512t1). Also custom curves. Supports X25519.
ECDH¶
- KeyGen:
(signed) Fixed-window via
SymCryptEcpointGenericSetRandom -> SymCryptEcpointScalarMul -> SymCryptEcpointScalarMulFixedWindow
. Algorithm 1 in Selecting Elliptic Curves for Cryptography: An Efficiency and Security Analysis.- NIST (Short-Weierstrass) use Jacobian.
dbl-2007-bl for generic double via
SymCryptEcpointDouble
or a tweak of dbl-2007-bl/dbl-2001-b formulae viaSymCryptShortWeierstrassDoubleSpecializedAm3
fora=-3
.add-2007-bl via
SymCryptEcpointAddDiffNonZero
. It also has side-channel unsafe versionSymCryptShortWeierstrassAddSideChannelUnsafe
and a generic wrapper for both viaSymCryptEcpointAdd
.
- NUMS (Twisted-Edwards) curves use Extended projective.
dbl-2008-hwcd via
SymCryptTwistedEdwardsDouble
.add-2008-hwcd via
SymCryptTwistedEdwardsAdd
orSymCryptTwistedEdwardsAddDiffNonZero
.
- Derive:
(signed) Fixed-window via
SymCryptEcDhSecretAgreement -> SymCryptEcpointScalarMul -> SymCryptEcpointScalarMulFixedWindow
. Algorithm 1 in Selecting Elliptic Curves for Cryptography: An Efficiency and Security Analysis.Same coordinates and formulas as KeyGen.
ECDSA¶
- KeyGen:
Short-Weierstrass
(signed) Fixed-window via
SymCryptEcpointGenericSetRandom -> SymCryptEcpointScalarMul -> SymCryptEcpointScalarMulFixedWindow
. Algorithm 1 in Selecting Elliptic Curves for Cryptography: An Efficiency and Security Analysis.- NIST (Short-Weierstrass) use Jacobian.
dbl-2007-bl for generic double via
SymCryptEcpointDouble
or a tweak of dbl-2007-bl/dbl-2001-b formulae viaSymCryptShortWeierstrassDoubleSpecializedAm3
fora=-3
.add-2007-bl via
SymCryptEcpointAddDiffNonZero
. It also has side-channel unsafe versionSymCryptShortWeierstrassAddSideChannelUnsafe
and a generic wrapper for both viaSymCryptEcpointAdd
.
- NUMS (Twisted-Edwards) curves use Extended projective.
dbl-2008-hwcd via
SymCryptTwistedEdwardsDouble
.add-2008-hwcd via
SymCryptTwistedEdwardsAdd
orSymCryptTwistedEdwardsAddDiffNonZero
.
- Sign:
Short-Weierstrass
(signed) Fixed-window via
SymCryptEcDsaSignEx -> SymCryptEcpointScalarMul -> SymCryptEcpointScalarMulFixedWindow
. Algorithm 1 in Selecting Elliptic Curves for Cryptography: An Efficiency and Security Analysis.Same coordinates and formulas as KeyGen.
- Verify:
Short-Weierstrass
Double-scalar multiplication using the width-w NAF with interleaving via
SymCryptEcDsaVerify > SymCryptEcpointMultiScalarMul -> SymCryptEcpointMultiScalarMulWnafWithInterleaving
. Algorithm 9 in Selecting Elliptic Curves for Cryptography: An Efficiency and Security Analysis.Same coordinates and formulas as KeyGen.
X25519¶
- KeyGen:
Montgomery
Ladder via
SymCryptMontgomeryPointScalarMul
.xz.
ladd-1987-m-3 via
SymCryptMontgomeryDoubleAndAdd
.
- Derive:
Same as Keygen.