Browse Source

GenerateSimpleKeyPairAlice -> GenerateKeyPairSimpleAlice.

Yawning Angel 2 years ago
parent
commit
7858583ad8
3 changed files with 6 additions and 6 deletions
  1. 2 2
      newhope_simple.go
  2. 2 2
      newhope_simple_test.go
  3. 2 2
      newhope_simple_testvectors_test.go

+ 2 - 2
newhope_simple.go

@@ -52,11 +52,11 @@ func (k *PrivateKeySimpleAlice) Reset() {
 	k.sk.reset()
 }
 
-// GenerateSimpleKeyPairAlice returns a NewHope-Simple private/public key pair.
+// GenerateKeyPairSimpleAlice returns a NewHope-Simple private/public key pair.
 // The private key is generated using the given reader, which must return
 // random data.  The receiver side of the key exchange (aka "Bob") MUST use
 // KeyExchangeSimpleBob() instead of this routine.
-func GenerateSimpleKeyPairAlice(rand io.Reader) (*PrivateKeySimpleAlice, *PublicKeySimpleAlice, error) {
+func GenerateKeyPairSimpleAlice(rand io.Reader) (*PrivateKeySimpleAlice, *PublicKeySimpleAlice, error) {
 	var a, e, pk, r poly
 	var seed, noiseSeed [SeedBytes]byte
 

+ 2 - 2
newhope_simple_test.go

@@ -16,9 +16,9 @@ import (
 func testSimpleIntegration(t *testing.T) {
 	for i := 0; i < 1024; i++ {
 		// Generate Alice's key's.
-		alicePriv, alicePub, err := GenerateSimpleKeyPairAlice(rand.Reader)
+		alicePriv, alicePub, err := GenerateKeyPairSimpleAlice(rand.Reader)
 		if err != nil {
-			t.Fatalf("GenerateSimpleKeyPair failed: %v", err)
+			t.Fatalf("GenerateKeyPairSimpleAlice failed: %v", err)
 		}
 
 		// Finish Bob's handshake.

+ 2 - 2
newhope_simple_testvectors_test.go

@@ -18,9 +18,9 @@ func TestNewHopeSimpleTestVectors(t *testing.T) {
 	r := newTestRng()
 
 	for i, v := range testVectorsSimple {
-		privAlice, pubAlice, err := GenerateSimpleKeyPairAlice(r)
+		privAlice, pubAlice, err := GenerateKeyPairSimpleAlice(r)
 		if err != nil {
-			t.Fatalf("[%d]: GenerateSimpleKeyPairAlice(r) failed: %v", i, err)
+			t.Fatalf("[%d]: GenerateKeyPairSimpleAlice(r) failed: %v", i, err)
 		}
 
 		vSndAlice, _ := hex.DecodeString(v.aliceSend)