Lines Matching refs:vector
72 void hexdump(const string& name, const vector<uint8_t>& data) { in hexdump()
112 string encodeHex(const vector<uint8_t>& data) { in encodeHex()
128 optional<vector<uint8_t>> decodeHex(const string& hexEncoded) { in decodeHex()
129 vector<uint8_t> out; in decodeHex()
172 optional<vector<uint8_t>> getRandom(size_t numBytes) { in getRandom()
173 vector<uint8_t> output; in getRandom()
182 optional<vector<uint8_t>> decryptAes128Gcm(const vector<uint8_t>& key, in decryptAes128Gcm()
183 const vector<uint8_t>& encryptedData, in decryptAes128Gcm()
184 const vector<uint8_t>& additionalAuthenticatedData) { in decryptAes128Gcm()
194 vector<uint8_t> plainText; in decryptAes128Gcm()
263 optional<vector<uint8_t>> encryptAes128Gcm(const vector<uint8_t>& key, const vector<uint8_t>& nonce, in encryptAes128Gcm()
264 const vector<uint8_t>& data, in encryptAes128Gcm()
265 const vector<uint8_t>& additionalAuthenticatedData) { in encryptAes128Gcm()
277 vector<uint8_t> encryptedData; in encryptAes128Gcm()
351 vector<uint8_t> certificateChainJoin(const vector<vector<uint8_t>>& certificateChain) { in certificateChainJoin()
352 vector<uint8_t> ret; in certificateChainJoin()
353 for (const vector<uint8_t>& certificate : certificateChain) { in certificateChainJoin()
359 optional<vector<vector<uint8_t>>> certificateChainSplit(const vector<uint8_t>& certificateChain) { in certificateChainSplit()
363 vector<vector<uint8_t>> certificates; in certificateChainSplit()
372 vector<uint8_t> cert = in certificateChainSplit()
373 vector<uint8_t>(certificateChain.begin() + begin, certificateChain.begin() + next); in certificateChainSplit()
379 static bool parseX509Certificates(const vector<uint8_t>& certificateChain, in parseX509Certificates()
380 vector<X509_Ptr>& parsedCertificates) { in parseX509Certificates()
395 bool certificateSignedByPublicKey(const vector<uint8_t>& certificate, in certificateSignedByPublicKey()
396 const vector<uint8_t>& publicKey) { in certificateSignedByPublicKey()
443 bool certificateChainValidate(const vector<uint8_t>& certificateChain) { in certificateChainValidate()
444 vector<X509_Ptr> certs; in certificateChainValidate()
469 bool checkEcDsaSignature(const vector<uint8_t>& digest, const vector<uint8_t>& signature, in checkEcDsaSignature()
470 const vector<uint8_t>& publicKey) { in checkEcDsaSignature()
513 vector<uint8_t> sha256(const vector<uint8_t>& data) { in sha256()
514 vector<uint8_t> ret; in sha256()
523 optional<vector<uint8_t>> signEcDsaDigest(const vector<uint8_t>& key, in signEcDsaDigest()
524 const vector<uint8_t>& dataDigest) { in signEcDsaDigest()
543 vector<uint8_t> signature; in signEcDsaDigest()
551 optional<vector<uint8_t>> signEcDsa(const vector<uint8_t>& key, const vector<uint8_t>& data) { in signEcDsa()
555 optional<vector<uint8_t>> hmacSha256(const vector<uint8_t>& key, const vector<uint8_t>& data) { in hmacSha256()
566 vector<uint8_t> hmac; in hmacSha256()
640 optional<vector<vector<uint8_t>>> createAttestation( in createAttestation()
641 const EVP_PKEY* key, const vector<uint8_t>& applicationId, const vector<uint8_t>& challenge, in createAttestation()
680 vector<uint8_t> subject(i2d_X509_NAME(subjectName.get(), NULL)); in createAttestation()
736 vector<vector<uint8_t>> attestationCertificate; in createAttestation()
740 vector<uint8_t>( in createAttestation()
748 optional<std::pair<vector<uint8_t>, vector<vector<uint8_t>>>> createEcKeyPairAndAttestation( in createEcKeyPairAndAttestation()
749 const vector<uint8_t>& challenge, const vector<uint8_t>& applicationId, in createEcKeyPairAndAttestation()
774 optional<vector<vector<uint8_t>>> attestationCert = createAttestation( in createEcKeyPairAndAttestation()
787 vector<uint8_t> keyPair(size); in createEcKeyPairAndAttestation()
794 optional<vector<vector<uint8_t>>> createAttestationForEcPublicKey( in createAttestationForEcPublicKey()
795 const vector<uint8_t>& publicKey, const vector<uint8_t>& challenge, in createAttestationForEcPublicKey()
796 const vector<uint8_t>& applicationId) { in createAttestationForEcPublicKey()
826 optional<vector<vector<uint8_t>>> attestationCert = in createAttestationForEcPublicKey()
837 optional<vector<uint8_t>> createEcKeyPair() { in createEcKeyPair()
867 vector<uint8_t> keyPair; in createEcKeyPair()
874 optional<vector<uint8_t>> ecKeyPairGetPublicKey(const vector<uint8_t>& keyPair) { in ecKeyPairGetPublicKey()
897 vector<uint8_t> publicKey; in ecKeyPairGetPublicKey()
904 optional<vector<uint8_t>> ecKeyPairGetPrivateKey(const vector<uint8_t>& keyPair) { in ecKeyPairGetPrivateKey()
923 vector<uint8_t> privateKey; in ecKeyPairGetPrivateKey()
940 optional<vector<uint8_t>> ecPrivateKeyToKeyPair(const vector<uint8_t>& privateKey) { in ecPrivateKeyToKeyPair()
969 vector<uint8_t> keyPair; in ecPrivateKeyToKeyPair()
976 optional<vector<uint8_t>> ecKeyPairGetPkcs12(const vector<uint8_t>& keyPair, const string& name, in ecKeyPairGetPkcs12()
1082 vector<uint8_t> pkcs12Bytes; in ecKeyPairGetPkcs12()
1090 optional<vector<uint8_t>> ecPublicKeyGenerateCertificate( in ecPublicKeyGenerateCertificate()
1091 const vector<uint8_t>& publicKey, const vector<uint8_t>& signingKey, in ecPublicKeyGenerateCertificate()
1094 const map<string, vector<uint8_t>>& extensions) { in ecPublicKeyGenerateCertificate()
1235 vector<uint8_t> certificate; in ecPublicKeyGenerateCertificate()
1242 optional<vector<uint8_t>> ecdh(const vector<uint8_t>& publicKey, in ecdh()
1243 const vector<uint8_t>& privateKey) { in ecdh()
1308 vector<uint8_t> sharedSecret; in ecdh()
1318 optional<vector<uint8_t>> hkdf(const vector<uint8_t>& sharedSecret, const vector<uint8_t>& salt, in hkdf()
1319 const vector<uint8_t>& info, size_t size) { in hkdf()
1320 vector<uint8_t> derivedKey; in hkdf()
1330 void removeLeadingZeroes(vector<uint8_t>& vec) { in removeLeadingZeroes()
1336 tuple<bool, vector<uint8_t>, vector<uint8_t>> ecPublicKeyGetXandY( in ecPublicKeyGetXandY()
1337 const vector<uint8_t>& publicKey) { in ecPublicKeyGetXandY()
1340 return std::make_tuple(false, vector<uint8_t>(), vector<uint8_t>()); in ecPublicKeyGetXandY()
1342 vector<uint8_t> x, y; in ecPublicKeyGetXandY()
1354 optional<vector<uint8_t>> certificateChainGetTopMostKey(const vector<uint8_t>& certificateChain) { in certificateChainGetTopMostKey()
1355 vector<X509_Ptr> certs; in certificateChainGetTopMostKey()
1384 vector<uint8_t> publicKey; in certificateChainGetTopMostKey()
1391 optional<vector<uint8_t>> certificateGetExtension(const vector<uint8_t>& x509Certificate, in certificateGetExtension()
1393 vector<X509_Ptr> certs; in certificateGetExtension()
1423 vector<uint8_t> result; in certificateGetExtension()
1429 optional<pair<size_t, size_t>> certificateFindPublicKey(const vector<uint8_t>& x509Certificate) { in certificateFindPublicKey()
1430 vector<X509_Ptr> certs; in certificateFindPublicKey()
1459 vector<uint8_t> publicKey; in certificateFindPublicKey()
1478 optional<pair<size_t, size_t>> certificateTbsCertificate(const vector<uint8_t>& x509Certificate) { in certificateTbsCertificate()
1479 vector<X509_Ptr> certs; in certificateTbsCertificate()
1495 vector<uint8_t> tbsCertificate(len); in certificateTbsCertificate()
1512 optional<pair<time_t, time_t>> certificateGetValidity(const vector<uint8_t>& x509Certificate) { in certificateGetValidity()
1513 vector<X509_Ptr> certs; in certificateGetValidity()
1538 optional<pair<size_t, size_t>> certificateFindSignature(const vector<uint8_t>& x509Certificate) { in certificateFindSignature()
1539 vector<X509_Ptr> certs; in certificateFindSignature()
1552 vector<char> signature(psig->length); in certificateFindSignature()
1573 vector<uint8_t> coseBuildToBeSigned(const vector<uint8_t>& encodedProtectedHeaders, in coseBuildToBeSigned()
1574 const vector<uint8_t>& data, in coseBuildToBeSigned()
1575 const vector<uint8_t>& detachedContent) { in coseBuildToBeSigned()
1582 vector<uint8_t> emptyExternalAad; in coseBuildToBeSigned()
1596 vector<uint8_t> coseEncodeHeaders(const cppbor::Map& protectedHeaders) { in coseEncodeHeaders()
1598 cppbor::Bstr emptyBstr(vector<uint8_t>({})); in coseEncodeHeaders()
1612 bool ecdsaSignatureCoseToDer(const vector<uint8_t>& ecdsaCoseSignature, in ecdsaSignatureCoseToDer()
1613 vector<uint8_t>& ecdsaDerSignature) { in ecdsaSignatureCoseToDer()
1643 bool ecdsaSignatureDerToCose(const vector<uint8_t>& ecdsaDerSignature, in ecdsaSignatureDerToCose()
1644 vector<uint8_t>& ecdsaCoseSignature) { in ecdsaSignatureDerToCose()
1666 optional<vector<uint8_t>> coseSignEcDsaWithSignature(const vector<uint8_t>& signatureToBeSigned, in coseSignEcDsaWithSignature()
1667 const vector<uint8_t>& data, in coseSignEcDsaWithSignature()
1668 const vector<uint8_t>& certificateChain) { in coseSignEcDsaWithSignature()
1681 optional<vector<vector<uint8_t>>> certs = support::certificateChainSplit(certificateChain); in coseSignEcDsaWithSignature()
1690 for (const vector<uint8_t>& cert : certs.value()) { in coseSignEcDsaWithSignature()
1697 vector<uint8_t> encodedProtectedHeaders = coseEncodeHeaders(protectedHeaders); in coseSignEcDsaWithSignature()
1709 vector<uint8_t> signatureCoseSign1; in coseSignEcDsaWithSignature()
1715 optional<vector<uint8_t>> coseSignEcDsa(const vector<uint8_t>& key, const vector<uint8_t>& data, in coseSignEcDsa()
1716 const vector<uint8_t>& detachedContent, in coseSignEcDsa()
1717 const vector<uint8_t>& certificateChain) { in coseSignEcDsa()
1729 optional<vector<vector<uint8_t>>> certs = support::certificateChainSplit(certificateChain); in coseSignEcDsa()
1738 for (const vector<uint8_t>& cert : certs.value()) { in coseSignEcDsa()
1745 vector<uint8_t> encodedProtectedHeaders = coseEncodeHeaders(protectedHeaders); in coseSignEcDsa()
1746 vector<uint8_t> toBeSigned = in coseSignEcDsa()
1749 optional<vector<uint8_t>> derSignature = signEcDsa(key, toBeSigned); in coseSignEcDsa()
1754 vector<uint8_t> coseSignature; in coseSignEcDsa()
1770 vector<uint8_t> signatureCoseSign1; in coseSignEcDsa()
1775 bool coseCheckEcDsaSignature(const vector<uint8_t>& signatureCoseSign1, in coseCheckEcDsaSignature()
1776 const vector<uint8_t>& detachedContent, in coseCheckEcDsaSignature()
1777 const vector<uint8_t>& publicKey) { in coseCheckEcDsaSignature()
1799 const vector<uint8_t> encodedProtectedHeaders = encodedProtectedHeadersBstr->value(); in coseCheckEcDsaSignature()
1807 vector<uint8_t> data; in coseCheckEcDsaSignature()
1833 const vector<uint8_t>& coseSignature = signatureBstr->value(); in coseCheckEcDsaSignature()
1835 vector<uint8_t> derSignature; in coseCheckEcDsaSignature()
1841 vector<uint8_t> toBeSigned = in coseCheckEcDsaSignature()
1851 optional<vector<uint8_t>> coseSignGetSignature(const vector<uint8_t>& signatureCoseSign1) { in coseSignGetSignature()
1867 vector<uint8_t> signature; in coseSignGetSignature()
1879 optional<vector<uint8_t>> coseSignGetPayload(const vector<uint8_t>& signatureCoseSign1) { in coseSignGetPayload()
1895 vector<uint8_t> data; in coseSignGetPayload()
1916 optional<int> coseSignGetAlg(const vector<uint8_t>& signatureCoseSign1) { in coseSignGetAlg()
1969 optional<vector<uint8_t>> coseSignGetX5Chain(const vector<uint8_t>& signatureCoseSign1) { in coseSignGetX5Chain()
2006 vector<uint8_t> certs; in coseSignGetX5Chain()
2013 const vector<uint8_t>& certValue = bstr->value(); in coseSignGetX5Chain()
2026 vector<uint8_t> coseBuildToBeMACed(const vector<uint8_t>& encodedProtectedHeaders, in coseBuildToBeMACed()
2027 const vector<uint8_t>& data, in coseBuildToBeMACed()
2028 const vector<uint8_t>& detachedContent) { in coseBuildToBeMACed()
2035 vector<uint8_t> emptyExternalAad; in coseBuildToBeMACed()
2050 optional<vector<uint8_t>> coseMac0(const vector<uint8_t>& key, const vector<uint8_t>& data, in coseMac0()
2051 const vector<uint8_t>& detachedContent) { in coseMac0()
2062 vector<uint8_t> encodedProtectedHeaders = coseEncodeHeaders(protectedHeaders); in coseMac0()
2063 vector<uint8_t> toBeMACed = coseBuildToBeMACed(encodedProtectedHeaders, data, detachedContent); in coseMac0()
2065 optional<vector<uint8_t>> mac = hmacSha256(key, toBeMACed); in coseMac0()
2084 optional<vector<uint8_t>> coseMacWithDigest(const vector<uint8_t>& digestToBeMaced, in coseMacWithDigest()
2085 const vector<uint8_t>& data) { in coseMacWithDigest()
2091 vector<uint8_t> encodedProtectedHeaders = coseEncodeHeaders(protectedHeaders); in coseMacWithDigest()
2110 optional<vector<uint8_t>> calcEMacKey(const vector<uint8_t>& privateKey, in calcEMacKey()
2111 const vector<uint8_t>& publicKey, in calcEMacKey()
2112 const vector<uint8_t>& sessionTranscriptBytes) { in calcEMacKey()
2113 optional<vector<uint8_t>> sharedSecret = support::ecdh(publicKey, privateKey); in calcEMacKey()
2118 vector<uint8_t> salt = support::sha256(sessionTranscriptBytes); in calcEMacKey()
2119 vector<uint8_t> info = {'E', 'M', 'a', 'c', 'K', 'e', 'y'}; in calcEMacKey()
2120 optional<vector<uint8_t>> derivedKey = support::hkdf(sharedSecret.value(), salt, info, 32); in calcEMacKey()
2128 optional<vector<uint8_t>> calcMac(const vector<uint8_t>& sessionTranscriptEncoded, in calcMac()
2130 const vector<uint8_t>& deviceNameSpacesEncoded, in calcMac()
2131 const vector<uint8_t>& eMacKey) { in calcMac()
2145 vector<uint8_t> deviceAuthenticationBytes = in calcMac()
2147 optional<vector<uint8_t>> calculatedMac = in calcMac()
2153 vector<vector<uint8_t>> chunkVector(const vector<uint8_t>& content, size_t maxChunkSize) { in chunkVector()
2154 vector<vector<uint8_t>> ret; in chunkVector()
2172 ret.emplace_back(vector<uint8_t>(begin, end)); in chunkVector()
2179 vector<uint8_t> testHardwareBoundKey = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
2181 const vector<uint8_t>& getTestHardwareBoundKey() { in getTestHardwareBoundKey()