MCPcopy Create free account
hub / github.com/QuipNetwork/cpp-sdk / generateKeyPair

Method generateKeyPair

src/cli.cpp:130–135  ·  view source on GitHub ↗

Generate a NEW keypair for a given vaultId using a random public seed This is used for creating the NEXT keypair during transfers

Source from the content-addressed store, hash-verified

128 // Generate a NEW keypair for a given vaultId using a random public seed
129 // This is used for creating the NEXT keypair during transfers
130 std::pair<WinternitzAddress, std::vector<std::array<uint8_t, 32>>>
131 generateKeyPair(const std::array<uint8_t, 32> &vaultId) {
132 // Use a cryptographically secure random 32-byte public seed for the next PQ owner
133 std::array<uint8_t, 32> public_seed = randomSeed32();
134 return recoverKeyPair(vaultId, public_seed);
135 }
136
137 // Deterministically recover keypair for a given vaultId and publicSeed
138 std::pair<WinternitzAddress, std::vector<std::array<uint8_t, 32>>>

Callers 5

handleDepositMethod · 0.80
handleTransferMethod · 0.80
handleExecuteMethod · 0.80
handleChangePqOwnerMethod · 0.80
handleGenerateKeypairMethod · 0.80

Calls 1

randomSeed32Function · 0.85

Tested by

no test coverage detected