Oracle DBMS_CRYPTO_INTERNAL Built-In Package
Versions 12.2 - 19.3

Security Advisory
The package is an undocumented supporting package for the DBMS_CRYPTO API. It appears, based on dependencies and object names to be primarily involved in the management of encryption metadata.

We call if out here in the Code Library because we know it is in some manner related to encryption and thus security but we do not know sufficient information to identify specific risks.
 
Recommended Security Rules

 NEVER
  • Grant execute on this package to any user or role
 WITH GREAT CARE
  • Check regularly to determine if execute on this package has been granted and if so treat it as highly suspicious: It should raise alarms.
 CAUTIONS
  • N/A
 
How Oracle Works
N/A N/A
 
DBMS_CRYPTO_FFI Package Information
AUTHID DEFINER
Dependencies
ALL_APPLY_CONFLICT_COLUMNS DBA_TAB_COLUMNS SQT_TAB_COL_STATISTICS
ALL_APPLY_KEY_COLUMNS DBA_TAB_COL_STATISTICS USER_COL_PENDING_STATS
ALL_APPLY_TABLE_COLUMNS DBA_TAB_HISTGRM_PENDING_STATS USER_NESTED_TABLE_COLS
ALL_COL_PENDING_STATS DBA_TAB_HISTOGRAMS USER_PART_COL_STATISTICS
ALL_NESTED_TABLE_COLS DBA_TSTZ_TABLES USER_PART_HISTOGRAMS
ALL_PART_COL_STATISTICS DBA_TSTZ_TAB_COLS USER_SUBPART_COL_STATISTICS
ALL_PART_HISTOGRAMS EXU10ASC USER_SUBPART_HISTOGRAMS
ALL_SUBPART_COL_STATISTICS EXU10ASCU USER_TAB_COLS
ALL_SUBPART_HISTOGRAMS EXU8ASC USER_TAB_COLS_V$
ALL_TAB_COLS EXU8ASCU USER_TAB_COLUMNS
ALL_TAB_COLS_V$ EXU8HST USER_TAB_COL_STATISTICS
ALL_TAB_COLUMNS EXU8HSTU USER_TAB_HISTGRM_PENDING_STATS
ALL_TAB_COL_STATISTICS KU$_10_1_HISTGRM_MAX_VIEW USER_TAB_HISTOGRAMS
ALL_TAB_HISTGRM_PENDING_STATS KU$_10_1_HISTGRM_MIN_VIEW USER_TSTZ_TABLES
ALL_TAB_HISTOGRAMS KU$_10_1_PTAB_COL_STATS_VIEW USER_TSTZ_TAB_COLS
CRYPTO_INTERNAL_LIB KU$_10_1_PTAB_STATS_VIEW WM$COLUMN_PROPS
DBA_COL_PENDING_STATS KU$_10_1_TAB_COL_STATS_VIEW WM$DBA_TAB_COLS
DBA_LOGSTDBY_EDS_SUPPORTED KU$_10_1_TAB_ONLY_STATS_VIEW WM_COMPRESS_BATCH_SIZES
DBA_NESTED_TABLE_COLS KU$_10_1_TAB_STATS_VIEW _HISTGRM_DEC
DBA_PART_COL_STATISTICS KU$_10_2_TAB_STATS_VIEW _HIST_HEAD_DEC
DBA_PART_HISTOGRAMS KU$_11_2_TAB_STATS_VIEW _OPTSTAT_HISTGRM_HISTORY_DEC
DBA_SUBPART_COL_STATISTICS KU$_COL_STATS_VIEW _OPTSTAT_HISTHEAD_HISTORY_DEC
DBA_SUBPART_HISTOGRAMS KU$_HISTGRM_VIEW _user_stat
DBA_TAB_COLS KU$_PTAB_STATS_VIEW _user_stat_varray
DBA_TAB_COLS_V$ KU$_TAB_ONLY_STATS_VIEW  
Documented in Types & Packages No
First Available 12.2
Security Model Owned by SYS with no privileges granted
Source {ORACLE_HOME}/rdbms/admin/prvtcia.plb
Subprograms
 
STATSDECRYPTNUM
Undocumented dbms_crypto_internal.statsDecryptNum(
obj_nbr       IN NUMBER,
col_nbr       IN NUMBER,
encrypted_num IN NUMBER)
RETURN NUMBER;
DECLARE
 objNum        sys.wri$_optstat_histhead_history.obj#%TYPE := 8476;
 intCol        sys.wri$_optstat_histhead_history.intcol#%TYPE := 1;
 encryptMinVal sys.wri$_optstat_histhead_history.minimum_enc := 2199;
BEGIN
  dbms_crypto_internal.statsDecryptNum(obj#, intcol#, minimum_enc);
END;
/
 
STATSDECRYPTRAW
Undocumented dbms_crypto_internal.statsDecryptRaw(
obj_nbr    IN NUMBER,
col_nbr    IN NUMBER,
ciphertext IN RAW)
RETURN RAW;
exec dbms_crypto_internal.statsDecryptRaw( obj#, intcol#, lowval);
 
STATSENCRYPTNUM
Undocumented dbms_crypto_internal.statsEncryptNum(
obj_nbr      IN NUMBER,
col_nbr      IN NUMBER,
num_in_clear IN NUMBER)
RETURN RAW;
TBD
 
STATSENCRYPTRAW
Undocumented dbms_crypto_internal.statsEncryptRaw(
obj_nbr    IN NUMBER,
col_nbr    IN NUMBER,
cleartext  IN RAW)
RETURN RAW;
TBD
 
UPDATESENSITIVESTATS
Undocumented dbms_crypto_internal.updateSensitiveStats;
exec dbms_crypto_internal.updateSensitiveStats;

Related Topics
DBMS_CRYPTO
DBMS_CRYPTO_FFI
DBMS_CRYPTO_TOOLKIT
DBMS_CRYPTO_TOOLKIT_FFI
DBMS_CRYPTO_TOOLKIT_TYPES
DBMS_OBFUSCATION_TOOLKIT
DBMS_RANDOM
DBMS_SQLHASH