Oracle Encrypt Method Similar to MySql - oracle

Is there any function in oracle similar to encrypt/decrypt functions in MySql?
If not how to proceed in oracle ?

Take a look at DBMS_CRYPTO
It has methods to encrypt and decrypt data built in. Better than writing your own.
http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_crypto.htm

Related

How to decrypt DB2 data in another data warehouse platform

We need to send data from db2 (db2 for AS400) to another data warehouse platform (Hive). But we need to encrypt data in DB2 first. And then target server will connect to DB2 to export data and decrypt data in target server.
SQL to encrypt data in DB2:
INSERT INTO TESTAES
SELECT ENCRYPT_AES( ACCOUNT, '1234567890') FROM TESTPLAIN;
I know the DECRYPT_CHAR function in DB2:
SELECT DECRYPT_CHAR( ACCOUNT, '1234567890') FROM TESTAES
But after we load this table to another platform, we don't know how to decrypt the data. We don't know the DB2 decryption algorithm. 
The way I thinks may works:
(1) Get the decryption algorithm of ENCRYPT_AES in DB2 and we can write a program in targer server to decrypt the data. But IBM shared this in any documents. I searched it in IBM DB2 document, just told us
Encryption algorithm: The internal encryption algorithm used is from the CLiC Toolkit from IBM Research. The 128-bit encryption key is derived from the password using a SHA1 message digest?https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/db2/rbafzscaencryptaes.htm
(2) Get the decryption algorithm package of ENCRYPT_AES in DB2 and we can import this package in targer server to decrypt the data. Did IBM have such package?
(3) Use another open-source/common function/package to encrypt data in DB2. And we know the algorithm and we can write program/or use the same algorithm package to decrypt the data. But I don't how can we encrypt data in AS400 db2 except ENCRYPT_AES. Maybe write a java program or something else?
Would anyone share this experience in encrypted data migration to another platform.
it is standard AES algorithm, but the default CCSID in AS400 is EBCDIC.
do you need to convert DATA to UTF-8 after decryption.
I think this question can be closed. Becuase
(1) I asked IBM Technical Support, he suggest us to write encryption/decryption function by ourselves. Maybe the algorithm of DB2 encryption function is a secret.
(2) I created an DB2 UDF to call Java Program in AS400. Finally, it works. I can encrypt data in DB2 and after other database get encrypted data and it can be decrypted in other database.

Session specific storage for UDFs in Firebird

For encryption purposes of some columns I wrote UDFs. I then realized that passing the keys through SQL is nonsense as the SYSDBA can trace SQL and look into session environment. And he exactly is the one, who should not access the data.
Full database encryption is no option for me due to the fact that most of the data does not need to be encrypted and speed is an important thing.
My approach is to transfer the key from client to server with ECC public/private key technique. This is easy to accomplish but where can I store the key for a session within my UDF? Can I get hold of some kind of information about the session of the caller within my UDF?

Oracle OLE DB - Connection string without password

I'm working on programmatic queries relying on the Oracle provider for OLE DB (in VB script).
I can successfully query my database using the standard syntax: Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;
But how can I make it work without disclosing the password?
I have Oracle Wallet running on my server. How could I integrate it with my script?
Any other idea?
OS authentication won't work here.
Thank you very much in advance for your suggestions.
Best,
Alexis

Is there anyway to encrypt oracle stored procedures?( Oracle 11g)

I don't want clients see my stored procedures,Is there anyway to encrypt oracle stored procedures??
You can "wrap" a pl/sql package body. It is obfuscated - see Here

How do I profile stored procedures on Oracle?

There is an Oracle DB to which I have access. I can view its packages using Aqua Data Studio and make queries to it. I don't have any access to the filesystem of the server.
There is also a binary that uses that database by calling stored procedures from it.
I want to know which stored procedures and with what parameters are used by this binary. It seems to be impossible to do with "Statement monitor for Oracle" - it only logs direct query calls, not stored procedures.
Can it be done with built-in trace if I don't have access to the filesystem?
Is there some other tool?
You can use the DBMS_PROFILER package: http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/12_tune.htm#45936
You can try PLSQL/Developer,it support to debug your procedure step by step.

Resources