From efe8185fabd8a246728a084fa8396654195c0f5e Mon Sep 17 00:00:00 2001 From: Kris Kwiatkowski Date: Mon, 10 Sep 2018 14:22:07 +0100 Subject: [PATCH] removes P751_SecretKeySize and P751_SampleRate Those two constnts are not used anymore and can be safely removed as it is not used anymore. SidhParams struct was also modified. --- internal/isogeny/types.go | 2 -- p751/consts.go | 6 ------ sidh/params.go | 1 - 3 files changed, 9 deletions(-) diff --git a/internal/isogeny/types.go b/internal/isogeny/types.go index b7d5523..9f28064 100644 --- a/internal/isogeny/types.go +++ b/internal/isogeny/types.go @@ -43,8 +43,6 @@ type SidhParams struct { SharedSecretSize uint // 2- and 3-torsion group parameter definitions A, B DomainParams - // Sample rate to obtain a value in [0,3^238] - SampleRate uint // Precomputed identity element in the Fp2 in Montgomery domain OneFp2 Fp2Element // Precomputed 1/2 in the Fp2 in Montgomery domain diff --git a/p751/consts.go b/p751/consts.go index 9f28863..a3719e4 100644 --- a/p751/consts.go +++ b/p751/consts.go @@ -3,10 +3,6 @@ package p751 import . "github.com/cloudflare/p751sidh/internal/isogeny" const ( - // The secret key size, in bytes. Secret key is actually different for - // torsion group 2 and 3. For 2-torsion group, last byte of secret key - // is always set to 0. - P751_SecretKeySize = 48 // SIDH public key byte size P751_PublicKeySize = 564 // SIDH shared secret byte size. @@ -15,8 +11,6 @@ const ( P751_SecretBitLenA = 372 // Size of secret key for 3-torsion group, corresponds to log_2(3^e3) P751_SecretBitLenB = 379 - // Sample rate to obtain a value in [0,3^238] - P751_SampleRate = 102 // P751 bytelen ceil(751/8) P751_Bytelen = 94 // Size of a compuatation strategy for 2-torsion group diff --git a/sidh/params.go b/sidh/params.go index 7d961af..3b47715 100644 --- a/sidh/params.go +++ b/sidh/params.go @@ -43,7 +43,6 @@ func init() { MsgLen: 32, // SIKEp751 provides 192 bit of classical security ([SIKE], 5.1) KemSize: 24, - SampleRate: p751.P751_SampleRate, Bytelen: p751.P751_Bytelen, Op: p751.FieldOperations(), }