Skip to content

zveinn/go-wasm-encryption

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang WebAssembly AES256 + Diffie Hellman

This code is a golang web assembly module which enabled AES256 encryption and Diffie Hellman handshakes.

Functionality

  • Diffie Hellman P512 curve Handshakes + Key generation
  • AES256 Encryption / Decryption
  • WASM status check function
  • Error handling
  • WASM shutdown function
  • WASM Panic test function

Building the WASM

$ GOOS=js GOARCH=wasm go build -o  wae.wasm

Examples

For example you can look at the index.html inside the "example" folder. You can also run the "server.go" file to spawn a temp webserver for testing.

$ cd example
$ go run .

Diffie Hellman Handshakes

This module can be used to handshake with a server or another user in whichever system you are developing.
Each back-and-forth handshake will consist of two "one-time-key" requests each one having their own UUID.

type OTK_REQUEST struct {
	X     *big.Int
	Y     *big.Int
	AUUID string
	BUUID string
}

These UUIDs are used to indentify matching handshake requests.
If you are handshaking with a server you can copy the "OTK_REQUEST" struct or make your own.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published