Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
9f59765 Add gf32 module (Tobin C. Harding) Pull request description: We are attempting to get this crate to v0.1 (ie, API stabilization). Currently we use a type call `u5` for the 5 bit math, while valid this is slightly misleading because our `u5` is not basic integer type. Within the bech32 encoding scheme the 5 bit type is an element of GF32 (Galois Field). Add a `gf32` module that defines a type `Fe32` (Field Element). This type is similar to the current `u5` but includes add/sub/div/mul over the finite field. Introduce the `primitives` module to hold the `gf32` module (and other future primitive types). As yet do not make use of the `Fe32` type. Doing so is trivial and will be done later after more primitive types are added. ### Note on attribution I'd like to be conscious not to make you feel like we are clobbering your crate clarkmoody, as such I left an attribution in this new file to you even though I copied the code from another crate that apoelstra had written. I felt this was correct because if this merges and eventually replaces the `u5` type the code is really similar to what you wrote originally. Also we are keeping your chosen MIT license and re licensing any code we pull from other places (I'm speaking for apoelstra really because the CC license is his favoured license but I believe I understand his wishes on this issue since we have discussed it before). ACKs for top commit: apoelstra: ACK 9f59765 clarkmoody: ACK 9f59765 Tree-SHA512: 5e3a4d335cd7a1af21bac85df040c0f4fb991950b3f186419f0a78b7075d94bd260d28d618eb7c78b7e78ccb7ad586d06345a06813cc3d4d075b45ddb390bd40
- Loading branch information