ChaCha20 (as described in rfc7539 with one 32 bit word counter)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.txt
rfc7539.go
rfc7539_test.go

README.txt

A go implementaton of ChaCha20 as described in rfc7539

result is a []uint8 that is the ciphertext

example of usage:

package main

import (
	"fmt"
	"github.com/ascottqqq/rfc7539"
)

func main() {
	fmt.Println(rfc7539.Encrypt(rfc7539.ChaCha20{[32]uint8{0x00, 0x00, 0x00, 0x00, 
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00}, 0, [12]uint8{0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, []byte("Hello world")})
}