Skip to content

Commit 31b8e4a

Browse files
MatheusFranco99GalRogozinski
authored andcommitted
Tests - Remove entropy in tests (#507)
* Solve entropy in simple case in which a fixed key can be used * Solve entropy in test type by changing the test spec: removing CypherText and using fixed keys
1 parent f33e089 commit 31b8e4a

File tree

11 files changed

+51
-66
lines changed

11 files changed

+51
-66
lines changed
-84 Bytes
Binary file not shown.
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"Name": "bls secret key encryption",
3-
"SKPem": "LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFcEFJQkFBS0NBUUVBMHlqa1ZKOTBPU1RRcjBXWmZyZjZzd2xRbG5LMEVjUGcvYVdldlBYMmo0eUtHOThYClk5YkxuOFRucS9yZW5vSUdHeVA0bS83RThtVDhTanEzM1BtVzZtT3dDUTM1c2VZU2U4K2hlVjJTWTdMZTZKMEYKeU1wTURBUlpJNllvdzY5Ulg5WXdXVTNxdXZUK0ljZXhtQnloTTNaelhQL3dlbW0rQmJOdUNzb1JZdk5RU3dZLwpqOVUwMGhPZVdiTFcvcTNGM0NDSkIrRUVVbCt1L1lEZUY2Nm8wcEljSEdiNXhMOFBuSFl4R24zUFJGOThORlpkCitQMTdtdFU4Q21vNEc0d0FhNlJCTTF0NUtQbUI5Y1phOHU5NEhKVkNmT3RKZGdTSnVPR2NsSyt5anZLZEFadDEKcWFkMkF5d296OXdyZHJIY2FBWURUUEh0ZnJhUnI4VXdra2gwTVFJREFRQUJBb0lCQUVlUGVpSDdqK1cxeGtzLwo2UTc2eHFsYUpNZDN3L0twVVZ4a2ZuRkhZZkd3RFRYNDJ2Sm8zc1VjYys3aXJBTkh5VTMxV05GMCs4V3gxNVpJClkvc3RVcW5JY3VYK3FIcFRvRHY1VjUzTHlrcWpXY3UzT3ppYTVqN0VVbmswWEdoRXgrMFVwM244WCtwUUVMZmQKOXgrM3hDR3VxTllCbnJ1OWpqcGNYcFNsZWxMd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mp6M1grUER1OUxid0E1NFdtClVRSURBUUFCCi0tLS0tRU5EIFJTQSBQVUJMSUMgS0VZLS0tLS0K",
5+
"PlainText": "X0cRp5bBEWtRGOw1J5+2TVUdmziBPSk5lU3S31Fg09k="
76
}
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"Name": "simple encryption",
3-
"SKPem": "LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFcEFJQkFBS0NBUUVBMlVsY0ErSHBHbndFSXpTbEVZeVAwNjlPeGhQYWN5eFZxNGdxTlpnZ1h5T1VEc1NICmpuRUU5SHNHK0N1UTJ4eXJyWkp2ZWsyV0tNa1ExaUNRd3FGQWppelNCbkw3ZnNBT2REM2NGdFkxMUNvUnZwcGUKMWZDK0VFRUZoOU4wanY4eHFNZStWU1RHTXRxaDBKU1Q0WTFPY2FQQ3lnMHh5MW5kMGM0MXBtbFJuSEpHNitDUwpVc256ZDQ0Qy8rTzRLU05CUXlPRGxlR0pSS3Naa0lPTldONUlESG5ndVdyVy9TcVIrTkI4bVlqdGR6bzJ4UXpqCldUUTZ3cEVRMGtoOFdtQ1VPMU1WWWRXZVcrVnVVeEZ4TWg1ekliYTdweUwwMnBpanBBMDRwWWxseFhxeHlzZ1YKbDFNcm1EaW5iZlZSZE1KSmg3czQ3VTVrRGpqREhHTU9wNkVCMndJREFRQUJBb0lCQVFDdEtTMVBXc1h0K1U5Qwp6ejJOVXJ0OE00VlBqWnJWbGt0ZnU5QUhqZ2llU1RoQTNKWTdDZzZzMXk2aXIvVnM2TmhZSnc3NEpNUzZGQ0o2Cnd0RWFpbTlyM29ReDU0aE5acmtlSWY0M3BOYVpFajI1N0VRUHN4K0V6SXlmeGdCcHhTM0tHQVN5emUrMXIwNnQKYnZxN0VXV21ZcDlsYmtaMGpGV2VVZnVuZHQ4M0VOTUxFODhhVDZVVUYvTFdrMG9nVHY2S2R5YXk1eFkyNHBWSAp0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JMSUMgS0VZLS0tLS0K",
5+
"PlainText": "aGVsbG8gd29ybGQ="
76
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"Name": "encoding",
3-
"Data": "EAAAABQBAAAcAQAABAIAAAQAAACYgUKFgsWIlct0CZJC3kNvJ5n3/KErongJ2Yx3cIpnoQtdifz+V/YCTeNEAM+9adOX9G80+V0Z4ZvuIBZJ2NU7Fwdv3EvlPKGHK68zO91Cx78rhIz1DAgw3ufNpw01tmo0XlBseM7CATaz4rzdLxSvdiuFz/PwAqHaCyY7WxfeoBD8gPB3BM8O0ohNqRuLG4A9K2hy5jjTOXxxxIAxrF7SNewtjtHlYLmwOiiSUQ6pp8DtbUoPRvR2ri6ERsvyoC+HHT/MqVUGn9xesON8VWI4DD9JDWZ0vXarDFsVkm0E53mD7J9Wt++dk2ewG+6lZgauPWQcKdx4tMHJ6g6s1/3OAQAAAAAAAAABAAAAAAAAAAAAAwEAAAAAjoAGZVGoGzGCWHCe2vfdH2PNaGoOTbiym7t6z+ZWCGd69aUn2USO5Hg1SF4CtQvARAAAAAIAAAAAAAAADAAAAAAAAAAUAAAApHmwI9nyjrnM3TW7lg+1wmVTDf8Xiufkqbd/AX91nKWiEl5ya94M2SozMAlUlMjAB4Kif6iQfowarePazbjgYUaGxn4fYoMEYF14YeDtmAPGriFrSq5VqP+0nu0ZPL6nRiYR0sWSvfUhTxJP56Ummrc9RO/J5s4avjL4GWrlJt4BAAAAAAAAAAEAAAAAAAAA"
3+
"Data": "EAAAABQBAAAcAQAABAIAAAQAAABGFn0Q4qSP1F0VirAXvbMN195yE2MgO0gwh/uN+9Rrhvd3r/g4OTcnWQF46szvdFU/pXs44SVThEk6fG7yDioRA9TnYk+ztXzO8fodxB37PuGzYK2dgFYWHVJ/Gy7M6PQkqAsXeOM7gPFLmalJ9S9T29V9GEo5/P2hZ8VxTiOStAac5mxOBeE6UNVkGdyU7tSRjnEpRXWJkRkj5wsKVlAZIUWX4IMclppUSxp2yBj0ovSeoi83cC6cT5sAU9DHPDozYjfuVyVRh3MdO/g7SNa1+7Gd4TIFQZTLXoXkmtJKXDw6PLCqPYFdvf+WzMUUtruLr1iM0y+2TPMZL3myun7eAQAAAAAAAAABAAAAAAAAAAAAAwEAAAAAjoAGZVGoGzGCWHCe2vfdH2PNaGoOTbiym7t6z+ZWCGd69aUn2USO5Hg1SF4CtQvARAAAAAIAAAAAAAAADAAAAAAAAAAUAAAApHmwI9nyjrnM3TW7lg+1wmVTDf8Xiufkqbd/AX91nKWiEl5ya94M2SozMAlUlMjAB4Kif6iQfowarePazbjgYUaGxn4fYoMEYF14YeDtmAPGriFrSq5VqP+0nu0ZPL6nRiYR0sWSvfUhTxJP56Ummrc9RO/J5s4avjL4GWrlJt4BAAAAAAAAAAEAAAAAAAAA"
44
}

types/spectest/generate/state_comparison/signedssvmsg_SignedSSVMessageTest/signedssvmsg valid.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"Messages": [
44
{
55
"Signatures": [
6-
"J2w5nI1bm849G/KAFxd8KnkbfpiElj7rnocTttlbYmfJ07xFGIEucVphQ0vm8Z1GltbtgNwtT4x0Dd8dmkHhmWXzWOIqyfwYM9wR256YhgeMtuJt2ZRXTzrWsjyEKl2W/P22RSNinuaZDT90I0bj7DTfFmJsoSpEh7FW96ApufDLxOHt7DvTBeQt/IYs2mP2a7KLM/KEX7LVAOVqdUDITs/xTt3eXfTmgJK1BHo/HC/kqNILgP4RtdTEw5kamPZoKqiZbHFhoCsO9AR1jCVC55TIlgx0F4EGOl7h6nU4H76BwLEp3SMUAtX+MZxbqMTd2ZijBtUXgNtOMBAmUIvdtw=="
6+
"RhZ9EOKkj9RdFYqwF72zDdfechNjIDtIMIf7jfvUa4b3d6/4ODk3J1kBeOrM73RVP6V7OOElU4RJOnxu8g4qEQPU52JPs7V8zvH6HcQd+z7hs2CtnYBWFh1SfxsuzOj0JKg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RVh4Smh1MGxHSmhUMFlZWUN4WUNhdk1aZjUwTlFETzRRQ2RlM2xzb0VZQgphdzBlZnRrWE5pMkxYL3h3aWozY044NTZkMkdvMGhZZjJCRVYySkUzb3pkU1NyNWNoaS9hVHYxM2w4YU1ZY2pXCjA4bHlBemxBVXozWGd2UmlkVktteHhoakFQRVRmM1BtcHV3aGFvM1luL3dMOFJSNk9BakNFUjRLN1JjLzV2bksKanZCaDU3bFNRZjdZRk9kV2ZnbEhjTWNYZndVNStldmFFbVJhaW9vYXpTQnkwMUtvMlJEQnBGL3VFNzdzZGYxQwo2NVRRSnZvS3kyRjBKUWJ2ME9RVFNqVzBDUHcwaFMydk96Qk5VK3ZBRUVYNHdxQmp6M1grUER1OUxid0E1NFdtClVRSURBUUFCCi0tLS0tRU5EIFJTQSBQVUJMSUMgS0VZLS0tLS0K"
7979
]
8080
}

types/spectest/generate/tests.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
package encryption
22

33
import (
4-
"fmt"
5-
"github.com/herumi/bls-eth-go-binary/bls"
64
"github.com/ssvlabs/ssv-spec/types"
5+
"github.com/ssvlabs/ssv-spec/types/testingutils"
76
)
87

98
// EncryptBLSSK tests encrypting a BLS private key
109
func EncryptBLSSK() *EncryptionSpecTest {
11-
types.InitBLS()
12-
blsSK := &bls.SecretKey{}
13-
blsSK.SetByCSPRNG()
1410

15-
sk, pk, _ := types.GenerateKey()
16-
pkObj, _ := types.PemToPublicKey(pk)
17-
cipher, _ := types.Encrypt(pkObj, blsSK.Serialize())
11+
ks := testingutils.Testing4SharesSet()
12+
13+
sk := ks.OperatorKeys[1]
14+
skPem := types.PrivateKeyToPem(sk)
15+
pkPem, err := types.GetPublicKeyPem(sk)
16+
if err != nil {
17+
panic(err)
18+
}
19+
20+
blsSK := ks.Shares[1]
1821

19-
fmt.Printf("cipher L: %d\n", len(cipher))
2022
return &EncryptionSpecTest{
21-
Name: "bls secret key encryption",
22-
SKPem: sk,
23-
PKPem: pk,
24-
PlainText: blsSK.Serialize(),
25-
CipherText: cipher,
23+
Name: "bls secret key encryption",
24+
SKPem: skPem,
25+
PKPem: pkPem,
26+
PlainText: blsSK.Serialize(),
2627
}
2728
}

types/spectest/tests/encryption/encryption.go

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,25 @@ package encryption
22

33
import (
44
"github.com/ssvlabs/ssv-spec/types"
5+
"github.com/ssvlabs/ssv-spec/types/testingutils"
56
)
67

78
// SimpleEncrypt tests simple rsa encrypt
89
func SimpleEncrypt() *EncryptionSpecTest {
9-
sk, pk, _ := types.GenerateKey()
10-
pkObj, _ := types.PemToPublicKey(pk)
11-
cipher, _ := types.Encrypt(pkObj, []byte("hello world"))
10+
11+
ks := testingutils.Testing4SharesSet()
12+
13+
sk := ks.OperatorKeys[1]
14+
skPem := types.PrivateKeyToPem(sk)
15+
pkPem, err := types.GetPublicKeyPem(sk)
16+
if err != nil {
17+
panic(err)
18+
}
19+
1220
return &EncryptionSpecTest{
13-
Name: "simple encryption",
14-
SKPem: sk,
15-
PKPem: pk,
16-
PlainText: []byte("hello world"),
17-
CipherText: cipher,
21+
Name: "simple encryption",
22+
SKPem: skPem,
23+
PKPem: pkPem,
24+
PlainText: []byte("hello world"),
1825
}
1926
}

types/spectest/tests/encryption/test.go

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
package encryption
22

33
import (
4+
"testing"
5+
46
"github.com/ssvlabs/ssv-spec/types"
57
"github.com/stretchr/testify/require"
6-
"testing"
78
)
89

910
type EncryptionSpecTest struct {
10-
Name string
11-
SKPem []byte
12-
PKPem []byte
13-
PlainText []byte
14-
CipherText []byte
11+
Name string
12+
SKPem []byte
13+
PKPem []byte
14+
PlainText []byte
1515
}
1616

1717
func (test *EncryptionSpecTest) TestName() string {
@@ -39,9 +39,4 @@ func (test *EncryptionSpecTest) Run(t *testing.T) {
3939
plain, err := types.Decrypt(sk, cipher)
4040
require.NoError(t, err)
4141
require.EqualValues(t, test.PlainText, plain)
42-
43-
// decrypt test's cipher and compare to plain text
44-
plain2, err := types.Decrypt(sk, test.CipherText)
45-
require.NoError(t, err)
46-
require.EqualValues(t, test.PlainText, plain2)
4742
}

types/spectest/tests/signedssvmsg/encoding.go

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package signedssvmsg
22

33
import (
4-
"github.com/ssvlabs/ssv-spec/types"
54
"github.com/ssvlabs/ssv-spec/types/testingutils"
65
)
76

@@ -10,17 +9,7 @@ func Encoding() *EncodingTest {
109

1110
ks := testingutils.Testing4SharesSet()
1211

13-
// RSA key to sign message
14-
skByts, _, err := types.GenerateKey()
15-
if err != nil {
16-
panic(err.Error())
17-
}
18-
sk, err := types.PemToPrivateKey(skByts)
19-
if err != nil {
20-
panic(err.Error())
21-
}
22-
23-
msg := testingutils.TestingSignedSSVMessage(ks.Shares[1], 1, sk)
12+
msg := testingutils.TestingSignedSSVMessage(ks.Shares[1], 1, ks.OperatorKeys[1])
2413

2514
byts, err := msg.Encode()
2615
if err != nil {

0 commit comments

Comments
 (0)