Documentation ¶
Index ¶
- Variables
- func CreateSignature(foldedPublicKeys, privateKeyContent, message, caseIdentifier []byte, ...) (int, []byte)
- func DerivePublicKey(encodedPrivateKey []byte, format string) (int, []byte)
- func EncodeSignarureToDER(signature *ring.Signature) (int, []byte)
- func EncodeSignarureToPEM(signature *ring.Signature) (int, []byte)
- func FoldPublicKeys(pubKeysContent [][]byte, hashName, format, order string) (int, []byte)
- func FormatDigest(text string) string
- func GeneratePrivateKey(curveName, format string) (int, []byte)
- func LoadFolder(folder string) [][]byte
- func ParsePrivateKey(content []byte) (int, *ecdsa.PrivateKey)
- func ParseSignature(content []byte) (int, ring.Signature)
- func PublicKeyXYCoordinates(pubicKey []byte) (int, []byte)
- func PublicKeysDigest(foldedPublicKeys []byte, separator bool) (int, []byte)
- func ReadFromFileOrStdin(sourceName string) []byte
- func ReadMessage(messageOrFilename string) []byte
- func SignatureKeyImage(body []byte, separator bool) (int, []byte)
- func UnfoldPublicKeysContent(content []byte) (int, []*ecdsa.PublicKey, ring.FoldedPublicKeys)
- func UnfoldPublicKeysIntoBytes(foldedPublicKeys []byte, outFormat string) (int, [][]byte)
- func VerifySignature(foldedPublicKeys, signature, message, caseIdentifier []byte) int
- func WriteOutput(output string, content []byte)
- type HashIdentKey
- type IdentKey
Constants ¶
This section is empty.
Variables ¶
var Enter = []byte("\n")
Enter asci character LF.
Functions ¶
func CreateSignature ¶
func CreateSignature(foldedPublicKeys, privateKeyContent, message, caseIdentifier []byte, outFormat string) (int, []byte)
CreateSignature creates signature and encode it into DER or PEM.
func DerivePublicKey ¶
DerivePublicKey derives public key from private.
func EncodeSignarureToDER ¶
EncodeSignarureToDER encodes signature to DER.
func EncodeSignarureToPEM ¶
EncodeSignarureToPEM encodes signature to PEM.
func FoldPublicKeys ¶
FoldPublicKeys create sequence of public keys coordinates.
func FormatDigest ¶
FormatDigest makes digest more human readable: 'c29da7' -> 'c2:9d:a7' openssl dgst -c -sha3-256 $curve-digests.txt | cut -d ' ' -f2
func GeneratePrivateKey ¶
GeneratePrivateKey generate private key and encode it to the required format.
func LoadFolder ¶
LoadFolder read all files from the folder.
func ParsePrivateKey ¶
func ParsePrivateKey(content []byte) (int, *ecdsa.PrivateKey)
ParsePrivateKey parses private key from bytes.
func ParseSignature ¶
ParseSignature parses signature in format PEM or DER.
func PublicKeyXYCoordinates ¶
PublicKeyXYCoordinates outputs public key coordinates X, Y.
func PublicKeysDigest ¶
PublicKeysDigest outputs public keys digest.
func ReadFromFileOrStdin ¶
ReadFromFileOrStdin reads from file or stdin.
func ReadMessage ¶
ReadMessage reads message from the file or use param as a message.
func SignatureKeyImage ¶
SignatureKeyImage outputs signature key image.
func UnfoldPublicKeysContent ¶
UnfoldPublicKeysContent restore public keys from sequence.
func UnfoldPublicKeysIntoBytes ¶
UnfoldPublicKeysIntoBytes restore public keys from sequence.
func VerifySignature ¶
VerifySignature verifies signature.
func WriteOutput ¶
WriteOutput writes content to the output.
Types ¶
type HashIdentKey ¶
type HashIdentKey struct {
// contains filtered or unexported fields
}
HashIdentKey contains the salted hash of public key file and IdentKey.