I need to program some error-correction and cryptography (just for testing, it won't be deployed anywhere), but I don't want to waste time writing my own finite field arithmetic library. I tried to search for it, but couldn't find something specific. Is there any finite field arithmetic library for Go?
评论:
smasher164:
theatrus:If you need operations over a Galois field, the crypto/cipher package implements the GCM mode. However looking at gcm.go, both
gcmFieldElement
andproductTable
are unexported.Otherwise, Russ Cox has an implementation of GF(256) that you should check out.
Look at the builtins. crypto/rsa uses math/big.
