DiceKeys Seeded Cryptography Library
|
3 #include "sodium-buffer.hpp"
4 #include "signature-verification-key.hpp"
61 const std::string& seedString,
75 const std::string& seedString,
90 const std::string& signingKeyAsJson
125 const unsigned char* message,
126 const size_t messageLength
140 const std::vector<unsigned char> &message
161 const char indent_char =
' '
210 const std::string& UserIdPacketContent,
static SigningKey fromSerializedBinaryForm(const SodiumBuffer &serializedBinaryForm)
Deserialize from a byte array stored as a list of: (keyBytes, signatureVerificationKeyBytes,...
Definition: signing-key.cpp:136
const std::string recipe
A JSON Format for Recipes string used to specify how this key is derived.
Definition: signing-key.hpp:30
A byte array containing a length and a pointer to memory (the data field), which ensures data is eras...
Definition: sodium-buffer.hpp:27
const SignatureVerificationKey getSignatureVerificationKey() const
Get a SignatureVerificationKey which is used to verify signatures generated with this SigningKey.
Definition: signing-key.cpp:91
SigningKey(const SigningKey &other)
Construct a copy of another SigningKey.
Definition: signing-key.cpp:32
const std::string toOpenSshPemPrivateKey(const std::string &comment) const
Convert to an OpenSSH-format private key binary writiable to a key file.
Definition: signing-key.cpp:145
const SodiumBuffer signingKeyBytes
The raw binary representation of the cryptographic signing key.
Definition: signing-key.hpp:26
SigningKeys generate signatures of messages which can then be used by the corresponding SignatureVeri...
Definition: signing-key.hpp:21
const SodiumBuffer getSeedBytes() const
Extract the 32-byte private seed (the compact representation of the private key) from the 64-byte sod...
Definition: signing-key.cpp:95
const SodiumBuffer toSerializedBinaryForm() const
Serialize to byte array as a list of: (keyBytes, signatureVerificationKeyBytes, recipe)
Definition: signing-key.cpp:128
const std::string toOpenPgpPemFormatSecretKey(const std::string &UserIdPacketContent, uint32_t timestamp) const
Convert to an OpenPGP PEM formatted (string) private key.
Definition: signing-key.cpp:153
const std::string toJson(int indent=-1, const char indent_char=' ') const
Serialize this object to a JSON-formatted string.
Definition: signing-key.cpp:118
const std::string toOpenSshPublicKey() const
Convert the signature-verification key to an OpenSSH public key string.
Definition: signing-key.cpp:149
A SignatureVerificationKey is used to verify that messages were signed by its corresponding SigningKe...
Definition: signature-verification-key.hpp:25
static SigningKey fromJson(const std::string &signingKeyAsJson)
Construct (reconsitute) the SigningKey from JSON format. The JSON object may or may not contain the s...
Definition: signing-key.cpp:44
const std::vector< unsigned char > getSignatureVerificationKeyBytes() const
Get the raw binary representation of the signature-verification key, re-deriving them from the signin...
Definition: signing-key.cpp:85
static SigningKey deriveFromSeed(const std::string &seedString, const std::string &recipe)
Construct a new SigningKey by deriving a signing key pair from a seed string and a set of recipe in J...
Definition: signing-key.cpp:65
const std::vector< unsigned char > generateSignature(const unsigned char *message, const size_t messageLength) const
Generate a signature for a message which can be used by the corresponding public SignatureVerificatio...
Definition: signing-key.cpp:102