My Oracle Support Banner

DBMS_CRYPTO BY RSA Raise ORA-28817,ORA-06512,ORA-06512 (Doc ID 3051634.1)

Last updated on NOVEMBER 15, 2024

Applies to:

Oracle Database - Enterprise Edition - Version 19.23.0.0.0 and later
Information in this document applies to any platform.

Symptoms

On 19.23.0.0.0 version, RDBMS

When trying to perform RSA encryption by DBMS_CRYPTO, receive the next error:

DECLARE
input_data VARCHAR2(2000) := 'Sensitive data to encrypt';
encryption_key RAW(2000) := UTL_RAW.cast_to_raw('public_key');
encrypted_data RAW(2000);
BEGIN
encrypted_data := DBMS_CRYPTO.PKENCRYPT(
src => UTL_RAW.cast_to_raw(input_data),
pub_key => encryption_key,
pubkey_alg => DBMS_CRYPTO.KEY_TYPE_RSA /*rsa_pub*/, -- RSA encryption
enc_alg => DBMS_CRYPTO.PKENCRYPT_RSA_PKCS1_OAEP_SHA2
);
END;
Error report -
ORA-28817: PL/SQL function returned an error.
ORA-06512: at "SYS.DBMS_CRYPTO_FFI", line 258
ORA-06512: at "SYS.DBMS_CRYPTO", line 143
ORA-06512: at line 6
28817. 00000 - "PL/SQL function returned an error."
*Cause: A PL/SQL function returned an error unexpectedly.
*Action: This is an internal error. Enable tracing to find more
information. Contact Oracle customer support if needed.
*Document: NO

Changes

 NA

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.