| 214 | } |
| 215 | |
| 216 | void BlindedPublicKey::GetCredential (uint8_t * credential) const |
| 217 | { |
| 218 | // A = destination's signing public key |
| 219 | // stA = signature type of A, 2 bytes big endian |
| 220 | uint16_t stA = htobe16 (GetSigType ()); |
| 221 | // stA1 = signature type of blinded A, 2 bytes big endian |
| 222 | uint16_t stA1 = htobe16 (GetBlindedSigType ()); |
| 223 | // credential = H("credential", A || stA || stA1) |
| 224 | H ("credential", { {GetPublicKey (), GetPublicKeyLen ()}, {(const uint8_t *)&stA, 2}, {(const uint8_t *)&stA1, 2} }, credential); |
| 225 | } |
| 226 | |
| 227 | void BlindedPublicKey::GetSubcredential (const uint8_t * blinded, size_t len, uint8_t * subcredential) const |
| 228 | { |