Skip to content

Commit

Permalink
Update go-sdk/internal/crypto/encryption.go
Browse files Browse the repository at this point in the history
Co-authored-by: Chengxuan Xing <[email protected]>
Signed-off-by: jimthematrix <[email protected]>
  • Loading branch information
jimthematrix and Chengxuan authored Sep 6, 2024
1 parent 43a6147 commit 5e32de0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go-sdk/internal/crypto/encryption.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func PoseidonEncrypt(msg []*big.Int, key []*big.Int, nonce *big.Int) ([]*big.Int
// Create the initial state
// S = (0, kS[0], kS[1], N + l * 2^128)
l := big.NewInt(int64(len(msg)))
state := []*big.Int{big.NewInt(0), key[0], key[1], big.NewInt(0).Add(nonce, big.NewInt(0).Mul(l, &two128))}
state := []*big.Int{big.NewInt(0), key[0], key[1], new(big.Int).Add(nonce, new(big.Int).Mul(l, &two128))}

cipherText := make([]*big.Int, length+1)
var err error
Expand Down

0 comments on commit 5e32de0

Please sign in to comment.