From 56d58cba091c7e03253b1b43b81e21d69c82c143 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Fri, 14 Sep 2018 16:10:44 +0700 Subject: RFC 7748: Export size constants for scalars, points --- crypto/src/math/ec/rfc7748/X25519.cs | 3 +++ crypto/src/math/ec/rfc7748/X448.cs | 3 +++ 2 files changed, 6 insertions(+) (limited to 'crypto/src') diff --git a/crypto/src/math/ec/rfc7748/X25519.cs b/crypto/src/math/ec/rfc7748/X25519.cs index a10d53da5..d63cc5a3e 100644 --- a/crypto/src/math/ec/rfc7748/X25519.cs +++ b/crypto/src/math/ec/rfc7748/X25519.cs @@ -6,6 +6,9 @@ namespace Org.BouncyCastle.Math.EC.Rfc7748 { public abstract class X25519 { + public const int PointSize = 32; + public const int ScalarSize = 32; + private const int C_A = 486662; private const int C_A24 = (C_A + 2)/4; diff --git a/crypto/src/math/ec/rfc7748/X448.cs b/crypto/src/math/ec/rfc7748/X448.cs index 88e8a5d76..aac603b08 100644 --- a/crypto/src/math/ec/rfc7748/X448.cs +++ b/crypto/src/math/ec/rfc7748/X448.cs @@ -6,6 +6,9 @@ namespace Org.BouncyCastle.Math.EC.Rfc7748 { public abstract class X448 { + public const int PointSize = 56; + public const int ScalarSize = 56; + private const uint C_A = 156326; private const uint C_A24 = (C_A + 2)/4; -- cgit 1.5.1