Home
last modified time | relevance | path

Searched refs:PrivateKey (Results 1 – 25 of 199) sorted by relevance

12345678

/external/boringssl/src/ssl/test/runner/
Dsign.go25 supportsKey(key crypto.PrivateKey) bool argument
26 signMessage(key crypto.PrivateKey, config *Config, msg []byte) ([]byte, error) argument
30 func selectSignatureAlgorithm(version uint16, key crypto.PrivateKey, config *Config, peerSigAlgs []… argument
55 func signMessage(version uint16, key crypto.PrivateKey, config *Config, sigAlg signatureAlgorithm, … argument
103 func (r *rsaPKCS1Signer) supportsKey(key crypto.PrivateKey) bool {
104 _, ok := key.(*rsa.PrivateKey)
108 func (r *rsaPKCS1Signer) signMessage(key crypto.PrivateKey, config *Config, msg []byte) ([]byte, er…
109 rsaKey, ok := key.(*rsa.PrivateKey)
143 func (e *ecdsaSigner) supportsKey(key crypto.PrivateKey) bool {
144 ecdsaKey, ok := key.(*ecdsa.PrivateKey)
[all …]
Dtls.go220 cert.PrivateKey, err = parsePrivateKey(keyDERBlock.Bytes)
234 priv, ok := cert.PrivateKey.(*rsa.PrivateKey)
244 priv, ok := cert.PrivateKey.(*ecdsa.PrivateKey)
255 priv, ok := cert.PrivateKey.(ed25519.PrivateKey)
296 func parsePrivateKey(der []byte) (crypto.PrivateKey, error) {
302 case *rsa.PrivateKey, *ecdsa.PrivateKey:
/external/ukey2/src/main/java/com/google/security/cryptauth/lib/securegcm/
DKeyEncoding.java22 import java.security.PrivateKey;
57 public static byte[] encodeUserPrivateKey(PrivateKey sk) { in encodeUserPrivateKey()
61 public static PrivateKey parseUserPrivateKey(byte[] encodedPrivateKey, boolean isLegacy) in parseUserPrivateKey()
83 public static byte[] encodeKeyAgreementPrivateKey(PrivateKey sk) { in encodeKeyAgreementPrivateKey()
90 public static PrivateKey parseKeyAgreementPrivateKey(byte[] keyBytes, boolean isLegacy) in parseKeyAgreementPrivateKey()
107 public static byte[] encodeSigningPrivateKey(PrivateKey sk) { in encodeSigningPrivateKey()
111 public static PrivateKey parseSigningPrivateKey(byte[] keyBytes) throws InvalidKeySpecException { in parseSigningPrivateKey()
123 public static boolean isLegacyPrivateKey(PrivateKey sk) { in isLegacyPrivateKey()
/external/python/rsa/tests/
Dtest_load_save_keys.py82 key = rsa.key.PrivateKey.load_pkcs1(PRIVATE_DER, 'DER')
83 expected = rsa.key.PrivateKey(3727264081, 65537, 3349121513, 65063, 57287)
106 key = rsa.key.PrivateKey.load_pkcs1(PRIVATE_DER, 'DER')
123 key = rsa.key.PrivateKey(3727264081, 65537, 3349121513, 65063, 57287)
153 key = rsa.key.PrivateKey.load_pkcs1(PRIVATE_PEM, 'PEM')
154 expected = rsa.key.PrivateKey(3727264081, 65537, 3349121513, 65063, 57287)
164 key = rsa.key.PrivateKey(3727264081, 65537, 3349121513, 65063, 57287)
193 privkey = rsa.key.PrivateKey.load_pkcs1(keydata)
203 pk = rsa.key.PrivateKey(3727264081, 65537, 3349121513, 65063, 57287)
Dtest_pem.py68 key = rsa.key.PrivateKey.load_pkcs1(private_key_pem)
72 key = rsa.key.PrivateKey.load_pkcs1(private_key_pem.encode('ascii'))
86 key = rsa.key.PrivateKey.load_pkcs1(private_key_pem)
100 key = rsa.key.PrivateKey.load_pkcs1(private_key_pem.encode('ascii'))
/external/conscrypt/common/src/main/java/org/conscrypt/
DOpenSSLKey.java22 import java.security.PrivateKey;
60 static OpenSSLKey fromPrivateKey(PrivateKey key) throws InvalidKeyException { in fromPrivateKey()
115 PrivateKey privateKey, PublicKey publicKey) throws InvalidKeyException { in fromPrivateKeyForTLSStackOnly()
139 PrivateKey key, ECParameterSpec ecParams) throws InvalidKeyException { in fromECPrivateKeyForTLSStackOnly()
159 private static OpenSSLKey getOpenSSLKey(PrivateKey key) { in getOpenSSLKey()
177 private static OpenSSLKey fromKeyMaterial(PrivateKey key) throws InvalidKeyException { in fromKeyMaterial()
197 private static OpenSSLKey wrapJCAPrivateKeyForTLSStackOnly(PrivateKey privateKey, in wrapJCAPrivateKeyForTLSStackOnly()
209 private static OpenSSLKey wrapPrivateKey(PrivateKey key) throws InvalidKeyException { in wrapPrivateKey()
295 PrivateKey getPrivateKey() throws NoSuchAlgorithmException { in getPrivateKey()
306 static PrivateKey getPrivateKey(PKCS8EncodedKeySpec keySpec, int type) in getPrivateKey()
DCryptoUpcalls.java21 import java.security.PrivateKey;
59 static byte[] ecSignDigestWithPrivateKey(PrivateKey javaKey, byte[] message) { in ecSignDigestWithPrivateKey()
70 private static byte[] signDigestWithPrivateKey(PrivateKey javaKey, byte[] message, in signDigestWithPrivateKey()
128 static byte[] rsaSignDigestWithPrivateKey(PrivateKey javaKey, int openSSLPadding, in rsaSignDigestWithPrivateKey()
134 static byte[] rsaDecryptWithPrivateKey(PrivateKey javaKey, int openSSLPadding, byte[] input) { in rsaDecryptWithPrivateKey()
138 private static byte[] rsaOpWithPrivateKey(PrivateKey javaKey, int openSSLPadding, in rsaOpWithPrivateKey()
DOpenSSLECKeyFactory.java23 import java.security.PrivateKey;
60 protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException { in engineGeneratePrivate()
110 } else if (key instanceof PrivateKey && ECPrivateKeySpec.class.isAssignableFrom(keySpec)) { in engineGetKeySpec()
120 } else if (key instanceof PrivateKey in engineGetKeySpec()
178 } else if ((key instanceof PrivateKey) && "PKCS#8".equals(key.getFormat())) { in engineTranslateKey()
DOpenSSLRSAKeyFactory.java23 import java.security.PrivateKey;
59 protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException { in engineGeneratePrivate()
127 } else if (key instanceof PrivateKey in engineGetKeySpec()
146 } else if (key instanceof PrivateKey && RSAPrivateKeySpec.class.isAssignableFrom(keySpec)) { in engineGetKeySpec()
156 } else if (key instanceof PrivateKey in engineGetKeySpec()
228 } else if ((key instanceof PrivateKey) && "PKCS#8".equals(key.getFormat())) { in engineTranslateKey()
/external/conscrypt/repackaged/common/src/main/java/com/android/org/conscrypt/
DOpenSSLKey.java23 import java.security.PrivateKey;
64 static OpenSSLKey fromPrivateKey(PrivateKey key) throws InvalidKeyException { in fromPrivateKey()
119 PrivateKey privateKey, PublicKey publicKey) throws InvalidKeyException { in fromPrivateKeyForTLSStackOnly()
143 PrivateKey key, ECParameterSpec ecParams) throws InvalidKeyException { in fromECPrivateKeyForTLSStackOnly()
163 private static OpenSSLKey getOpenSSLKey(PrivateKey key) { in getOpenSSLKey()
181 private static OpenSSLKey fromKeyMaterial(PrivateKey key) throws InvalidKeyException { in fromKeyMaterial()
201 private static OpenSSLKey wrapJCAPrivateKeyForTLSStackOnly(PrivateKey privateKey, in wrapJCAPrivateKeyForTLSStackOnly()
213 private static OpenSSLKey wrapPrivateKey(PrivateKey key) throws InvalidKeyException { in wrapPrivateKey()
300 PrivateKey getPrivateKey() throws NoSuchAlgorithmException { in getPrivateKey()
311 static PrivateKey getPrivateKey(PKCS8EncodedKeySpec keySpec, int type) in getPrivateKey()
DCryptoUpcalls.java22 import java.security.PrivateKey;
60 static byte[] ecSignDigestWithPrivateKey(PrivateKey javaKey, byte[] message) { in ecSignDigestWithPrivateKey()
71 private static byte[] signDigestWithPrivateKey(PrivateKey javaKey, byte[] message, in signDigestWithPrivateKey()
129 static byte[] rsaSignDigestWithPrivateKey(PrivateKey javaKey, int openSSLPadding, in rsaSignDigestWithPrivateKey()
135 static byte[] rsaDecryptWithPrivateKey(PrivateKey javaKey, int openSSLPadding, byte[] input) { in rsaDecryptWithPrivateKey()
139 private static byte[] rsaOpWithPrivateKey(PrivateKey javaKey, int openSSLPadding, in rsaOpWithPrivateKey()
DOpenSSLECKeyFactory.java24 import java.security.PrivateKey;
64 protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException { in engineGeneratePrivate()
114 } else if (key instanceof PrivateKey && ECPrivateKeySpec.class.isAssignableFrom(keySpec)) { in engineGetKeySpec()
124 } else if (key instanceof PrivateKey in engineGetKeySpec()
182 } else if ((key instanceof PrivateKey) && "PKCS#8".equals(key.getFormat())) { in engineTranslateKey()
DOpenSSLRSAKeyFactory.java24 import java.security.PrivateKey;
64 protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException { in engineGeneratePrivate()
132 } else if (key instanceof PrivateKey in engineGetKeySpec()
151 } else if (key instanceof PrivateKey && RSAPrivateKeySpec.class.isAssignableFrom(keySpec)) { in engineGetKeySpec()
161 } else if (key instanceof PrivateKey in engineGetKeySpec()
233 } else if ((key instanceof PrivateKey) && "PKCS#8".equals(key.getFormat())) { in engineTranslateKey()
/external/conscrypt/testing/src/main/java/org/conscrypt/javax/net/ssl/
DRandomPrivateKeyX509ExtendedKeyManager.java23 import java.security.PrivateKey;
37 private final Map<String, PrivateKey> cachedKeys = new HashMap<String, PrivateKey>();
42 public PrivateKey getPrivateKey(String alias) { in getPrivateKey()
43 PrivateKey originalPrivateKey = super.getPrivateKey(alias); in getPrivateKey()
47 PrivateKey result; in getPrivateKey()
/external/conscrypt/repackaged/testing/src/main/java/com/android/org/conscrypt/javax/net/ssl/
DRandomPrivateKeyX509ExtendedKeyManager.java24 import java.security.PrivateKey;
39 private final Map<String, PrivateKey> cachedKeys = new HashMap<String, PrivateKey>();
44 public PrivateKey getPrivateKey(String alias) { in getPrivateKey()
45 PrivateKey originalPrivateKey = super.getPrivateKey(alias); in getPrivateKey()
49 PrivateKey result; in getPrivateKey()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/x509/
DX509V1CertificateGenerator.java10 import java.security.PrivateKey;
187 PrivateKey key) in generateX509Certificate()
206 PrivateKey key, in generateX509Certificate()
227 PrivateKey key, in generateX509Certificate()
241 PrivateKey key, in generateX509Certificate()
277 PrivateKey key) in generate()
292 PrivateKey key, in generate()
317 PrivateKey key, in generate()
330 PrivateKey key, in generate()
DX509V3CertificateGenerator.java10 import java.security.PrivateKey;
324 PrivateKey key) in generateX509Certificate()
344 PrivateKey key, in generateX509Certificate()
364 PrivateKey key, in generateX509Certificate()
378 PrivateKey key, in generateX509Certificate()
414 PrivateKey key) in generate()
430 PrivateKey key, in generate()
461 PrivateKey key, in generate()
474 PrivateKey key, in generate()
/external/boringssl/src/ssl/test/runner/ed25519/
Ded25519.go45 type PrivateKey []byte type
48 func (priv PrivateKey) Public() crypto.PublicKey {
57 func (priv PrivateKey) Seed() []byte {
68 func (priv PrivateKey) Sign(rand io.Reader, message []byte, opts crypto.SignerOpts) (signature []by…
78 func GenerateKey(rand io.Reader) (PublicKey, PrivateKey, error) {
99 func NewKeyFromSeed(seed []byte) PrivateKey {
125 func Sign(privateKey PrivateKey, message []byte) []byte { argument
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/x509/
DX509V1CertificateGenerator.java11 import java.security.PrivateKey;
198 PrivateKey key) in generateX509Certificate()
217 PrivateKey key, in generateX509Certificate()
238 PrivateKey key, in generateX509Certificate()
252 PrivateKey key, in generateX509Certificate()
288 PrivateKey key) in generate()
303 PrivateKey key, in generate()
329 PrivateKey key, in generate()
342 PrivateKey key, in generate()
DX509V3CertificateGenerator.java11 import java.security.PrivateKey;
345 PrivateKey key) in generateX509Certificate()
365 PrivateKey key, in generateX509Certificate()
385 PrivateKey key, in generateX509Certificate()
399 PrivateKey key, in generateX509Certificate()
437 PrivateKey key) in generate()
453 PrivateKey key, in generate()
484 PrivateKey key, in generate()
497 PrivateKey key, in generate()
/external/oauth/core/src/main/java/net/oauth/signature/
DRSA_SHA1.java23 import java.security.PrivateKey;
89 private PrivateKey privateKey = null;
100 if (privateKeyObject instanceof PrivateKey) { in initialize()
101 privateKey = (PrivateKey)privateKeyObject; in initialize()
178 private PrivateKey getPrivateKeyFromDer(byte[] privateKeyObject) in getPrivateKeyFromDer()
185 private PrivateKey getPrivateKeyFromPem(String privateKeyObject) in getPrivateKeyFromPem()
/external/conscrypt/openjdk-integ-tests/src/test/java/org/conscrypt/java/security/
DSignatureTest.java33 import java.security.PrivateKey;
1875 PrivateKey privKey = kf.generatePrivate(privKeySpec); in testVerify_SHA1withRSA_Key_InitSignThenInitVerify_Success()
1929 final PrivateKey privKey; in testSign_SHA1withRSA_CrtKeyWithPublicExponent_Success()
1965 final PrivateKey privKey; in testSign_SHA1withRSA_CrtKey_NoPrivateExponent_Failure()
1990 final PrivateKey privKey; in testSign_SHA1withRSA_CrtKey_NoModulus_Failure()
2014 final PrivateKey privKey; in testSign_SHA1withRSA_Key_EmptyKey_Failure()
2037 PrivateKey privKey = kf.generatePrivate(keySpec); in testSign_SHA1withRSA_Key_Success()
2062 final PrivateKey privKey = kf.generatePrivate(keySpec); in testSign_SHA224withRSA_Key_Success()
2087 final PrivateKey privKey = kf.generatePrivate(keySpec); in testSign_SHA256withRSA_Key_Success()
2111 PrivateKey privKey = kf.generatePrivate(keySpec); in testSign_SHA384withRSA_Key_Success()
[all …]
/external/conscrypt/repackaged/openjdk-integ-tests/src/test/java/com/android/org/conscrypt/java/security/
DSignatureTest.java34 import java.security.PrivateKey;
1879 PrivateKey privKey = kf.generatePrivate(privKeySpec); in testVerify_SHA1withRSA_Key_InitSignThenInitVerify_Success()
1933 final PrivateKey privKey; in testSign_SHA1withRSA_CrtKeyWithPublicExponent_Success()
1969 final PrivateKey privKey; in testSign_SHA1withRSA_CrtKey_NoPrivateExponent_Failure()
1994 final PrivateKey privKey; in testSign_SHA1withRSA_CrtKey_NoModulus_Failure()
2018 final PrivateKey privKey; in testSign_SHA1withRSA_Key_EmptyKey_Failure()
2041 PrivateKey privKey = kf.generatePrivate(keySpec); in testSign_SHA1withRSA_Key_Success()
2066 final PrivateKey privKey = kf.generatePrivate(keySpec); in testSign_SHA224withRSA_Key_Success()
2091 final PrivateKey privKey = kf.generatePrivate(keySpec); in testSign_SHA256withRSA_Key_Success()
2115 PrivateKey privKey = kf.generatePrivate(keySpec); in testSign_SHA384withRSA_Key_Success()
[all …]
/external/boringssl/src/crypto/evp/
Devp_tests.txt6 PrivateKey = RSA-2048
31 PrivateKey = RSA-512
36 PrivateKey = RSA-515
41 PrivateKey = P-256
46 PrivateKey = P-256-MissingPublic
51 PrivateKey = P-256-ExtraParameters
58 PrivateKey = P-256-BadInnerParameters
78 PrivateKey = DSA-1024
93 PrivateKey = Ed25519
97 PrivateKey = Ed25519-2
[all …]
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/jcajce/provider/asymmetric/x509/
DKeyFactory.java7 import java.security.PrivateKey;
25 protected PrivateKey engineGeneratePrivate( in engineGeneratePrivate()
34 PrivateKey key = BouncyCastleProvider.getPrivateKey(info); in engineGeneratePrivate()

12345678