github.com/geniusesgroup/libgo@v0.0.0-20220713101832-828057a9d3d4/achaemenid/cryptography.go (about) 1 /* For license and copyright information please see LEGAL file in repository */ 2 3 package achaemenid 4 5 import ( 6 "../crypto" 7 ) 8 9 // cryptography : Public-key for related domain. 10 type cryptography struct { 11 publicKey [32]byte // Use new algorithm like 256bit ECC(256bit) instead of RSA(4096bit) 12 privateKey [32]byte // Use new algorithm like 256bit ECC(256bit) instead of RSA(4096bit) 13 ChecksumGenerator crypto.Hash256 14 } 15 16 // init make and register cryptography data for given server 17 func (c *cryptography) init() { 18 // make public & private key for desire node e.g. node12.sabz.city and store them 19 c.publicKey = [32]byte{} 20 c.privateKey = [32]byte{} 21 // ecdsa.GenerateKey() 22 23 return 24 } 25 26 func (c *cryptography) shutdown() { 27 // TODO::: 28 29 // Send signal to DNS & Certificate server to revoke app data. 30 }