wasm-sign 0.2.0

WebAssembly module signing and verification tool to proof authenticity and integrity of WebAssembly bytecodes. The signature is attached as Custom-Section to the end of th module. The signed module can be transmitted over network. Recipients parsing the signed module will 'see' an additional Custom-Section of type 0 and name 'signature'. The Signature adds an overhead of 118 bytes.
Documentation

PRIV_FILE=signerkey.pem
PUB_FILE=signerkey.pub.pem

PRIV_384_FILE=signerkey384.pem
PUB_384_FILE=signerkey384.pub.pem

WASM_FILE=res/transform.wasm
SIGNED_WASM_FILE=res/transform-signed.wasm

$(PRIV_FILE):
	openssl ecparam -name secp256k1 -genkey -noout -out $(PRIV_FILE)

$(PRIV_384_FILE):
	openssl ecparam -name secp384r1 -genkey -noout -out $(PRIV_384_FILE)

$(PUB_FILE): $(PRIV_FILE)
	openssl ec -in $(PRIV_FILE) -pubout -outform pem -out $(PUB_FILE)

$(PUB_384_FILE): $(PRIV_384_FILE)
	openssl ec -in $(PRIV_384_FILE) -pubout -outform pem -out $(PUB_384_FILE)

test:
	cargo test

asn1parse:  
	openssl asn1parse -in $(PRIV_FILE) -inform pem
	openssl asn1parse -in $(PRIV_384_FILE) -inform pem

list-curves:
	openssl ecparam -list_curves

clean:
	rm -f *.pem