Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/midnight-wonderer/ige-go
add Infinite Garble Extension mode of operation support to golang
https://github.com/midnight-wonderer/ige-go
Last synced: 8 days ago
JSON representation
add Infinite Garble Extension mode of operation support to golang
- Host: GitHub
- URL: https://github.com/midnight-wonderer/ige-go
- Owner: midnight-wonderer
- License: other
- Created: 2014-06-10T07:14:26.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-07-30T19:46:24.000Z (over 10 years ago)
- Last Synced: 2024-03-14T19:19:40.528Z (10 months ago)
- Language: Go
- Size: 176 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
###IGE-go
My favorite cryptography mode of operation scheme for the block cipher, Infinite Garble Extension. It is not good for general purpose message authentication though.
Since you are here I guess you know why and when to use IGE mode but if not just [Google it](https://encrypted.google.com/search?q=Infinite+Garble+Extension&hl=en) for more info.###Install
go get github.com/MidnightWonderer/IGE-go/ige###Example Usage
```Go
package mainimport (
"crypto/aes"
"encoding/hex"
"fmt"
"github.com/MidnightWonderer/IGE-go/ige"
)func main() {
aesKey, _ := hex.DecodeString("5468697320697320616E20696D706C65")
aesBlock, _ := aes.NewCipher(aesKey)
igeIV, _ := hex.DecodeString("6D656E746174696F6E206F6620494745206D6F646520666F72204F70656E5353")
igeEnc := ige.NewIGEEncrypter(aesBlock, igeIV)
crypttext, _ := hex.DecodeString("99706487A1CDE613BC6DE0B6F24B1C7AA448C8B9C3403E3467A8CAD89340F53B")
fmt.Printf("%s\r\n", hex.EncodeToString(crypttext))
igeEnc.CryptBlocks(crypttext, crypttext)
fmt.Printf("%s\r\n", hex.EncodeToString(crypttext))
//print:
//99706487a1cde613bc6de0b6f24b1c7aa448c8b9c3403e3467a8cad89340f53b
//4c2e204c6574277320686f70652042656e20676f74206974207269676874210a
//test vector:
//https://web.archive.org/web/20120418022623/http://www.links.org/files/openssl-ige.pdf
}
```###etc.
IGE-go was placed under The MIT-Zero License. Contribution back is encouraged.