Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for DecryptPKCS1v15SessionKey (0.63 sec)

  1. src/crypto/rsa/pkcs1v15.go

    	}
    	if valid == 0 {
    		return nil, ErrDecryption
    	}
    	return out[index:], nil
    }
    
    // DecryptPKCS1v15SessionKey decrypts a session key using RSA and the padding
    // scheme from PKCS #1 v1.5. The random parameter is legacy and ignored, and it
    // can be nil.
    //
    // DecryptPKCS1v15SessionKey returns an error if the ciphertext is the wrong
    // length or if the ciphertext is greater than the public modulus. Otherwise, no
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:21 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  2. src/crypto/rsa/example_test.go

    // avoid disclosing whether the received RSA message was well-formed
    // (that is, whether the result of decrypting is a correctly padded
    // message) because this leaks secret information.
    // DecryptPKCS1v15SessionKey is designed for this situation and copies
    // the decrypted, symmetric key (if well-formed) in constant-time over
    // a buffer that contains a random key. Thus, if the RSA result isn't
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 22:52:37 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  3. src/crypto/rsa/pkcs1v15_test.go

    		"FAIL",
    	},
    }
    
    func TestEncryptPKCS1v15SessionKey(t *testing.T) {
    	for i, test := range decryptPKCS1v15SessionKeyTests {
    		key := []byte("FAIL")
    		err := DecryptPKCS1v15SessionKey(nil, rsaPrivateKey, decodeBase64(test.in), key)
    		if err != nil {
    			t.Errorf("#%d error decrypting", i)
    		}
    		want := []byte(test.out)
    		if !bytes.Equal(key, want) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 00:16:30 UTC 2022
    - 8.6K bytes
    - Viewed (0)
  4. src/crypto/rsa/rsa_test.go

    	}
    	if err == nil {
    		dec, err := DecryptPKCS1v15(nil, priv, enc)
    		if err != nil {
    			t.Errorf("DecryptPKCS1v15: %v", err)
    		}
    		err = DecryptPKCS1v15SessionKey(nil, priv, enc, make([]byte, 4))
    		if err != nil {
    			t.Errorf("DecryptPKCS1v15SessionKey: %v", err)
    		}
    		if !bytes.Equal(dec, msg) {
    			t.Errorf("got:%x want:%x (%+v)", dec, msg, priv)
    		}
    	}
    
    	label := []byte("label")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 12 00:55:41 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  5. src/crypto/rsa/rsa.go

    	case *PKCS1v15DecryptOptions:
    		if l := opts.SessionKeyLen; l > 0 {
    			plaintext = make([]byte, l)
    			if _, err := io.ReadFull(rand, plaintext); err != nil {
    				return nil, err
    			}
    			if err := DecryptPKCS1v15SessionKey(rand, priv, ciphertext, plaintext); err != nil {
    				return nil, err
    			}
    			return plaintext, nil
    		} else {
    			return DecryptPKCS1v15(rand, priv, ciphertext)
    		}
    
    	default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"CRTValue", Type, 0},
    		{"CRTValue.Coeff", Field, 0},
    		{"CRTValue.Exp", Field, 0},
    		{"CRTValue.R", Field, 0},
    		{"DecryptOAEP", Func, 0},
    		{"DecryptPKCS1v15", Func, 0},
    		{"DecryptPKCS1v15SessionKey", Func, 0},
    		{"EncryptOAEP", Func, 0},
    		{"EncryptPKCS1v15", Func, 0},
    		{"ErrDecryption", Var, 0},
    		{"ErrMessageTooLong", Var, 0},
    		{"ErrVerification", Var, 0},
    		{"GenerateKey", Func, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  7. api/go1.txt

    pkg crypto/rsa, func DecryptOAEP(hash.Hash, io.Reader, *PrivateKey, []uint8, []uint8) ([]uint8, error)
    pkg crypto/rsa, func DecryptPKCS1v15(io.Reader, *PrivateKey, []uint8) ([]uint8, error)
    pkg crypto/rsa, func DecryptPKCS1v15SessionKey(io.Reader, *PrivateKey, []uint8, []uint8) error
    pkg crypto/rsa, func EncryptOAEP(hash.Hash, io.Reader, *PublicKey, []uint8, []uint8) ([]uint8, error)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
Back to top