Open doubiliu opened 2 months ago
result:
14:51:00 DBG running circuit in test engine aes128_gcm_test.go:204: Error Trace: Error: Received unexpected error: [assertIsEqual] 14 == 191 circom2.(*GCM).Assert aes128_gcm_test.go:93 circom2.(*GCMWrapper).Define aes128_gcm_test.go:50 Test: TestAESGCMCircuit --- FAIL: TestAESGCMCircuit (1497.83s)
The AESGCM encryption I use externally is the standard library
`
func AesGcmEncrypt(key []byte, plaintext []byte) (ciphertext, nonce []byte) { block, err := aes.NewCipher(key) if err != nil { panic(err.Error()) } nonce = make([]byte, 12) if _, err := io.ReadFull(random.Reader, nonce); err != nil { panic(err.Error()) } aesgcm, err := cipher.NewGCM(block) if err != nil { panic(err.Error()) } ciphertext = aesgcm.Seal(nil, nonce, plaintext, nil) return }
`
I wrote a simple test for AES128. But the operation result is wrong
`func TestAESGCMCircuit(t *testing.T) {
}`