Field encryption

Does anyone know what I need to do to encrypt the values for a particular field in a table?, rather than using views/roles or fine-grained access control,
thanks.

I used the following functions to encode, respectively decode sonething.
Function n_code ( V$S in varchar2 ) RETURN varchar2
IS
phrase varchar2(10):='Your Key Phrase'; -- CONSTANT
s1 varchar2(1);
s2 varchar2(1);
x number;
y number;
V_Temp varchar2(10):='';
BEGIN
for count in 1..length(V$S) loop
s1:=substr(V$S,count,1);
s2:=substr(Phrase,count,1);
x:=ascii(s1);
y:=ascii(s2);
x:=mod(x+y,256);
s1:=chr(x);
V_Temp:=concat(V_Temp,s1);
--dbms_output.put_line(s1);
end loop;
-- dbms_output.put_line(retur);
RETURN V_Temp;
EXCEPTION WHEN OTHERS THEN RETURN NULL;
END;
Function d_code ( V$S in varchar2 ) RETURN varchar2
IS
phrase varchar2(10):='Your Key Phrase'; -- CONSTANT !!!
s1 varchar2(1);
s2 varchar2(1);
x number;
y number;
V_Temp varchar2(10):='';
BEGIN
for count in 1..length(V$S) loop
s1:=substr(V$S,count,1);
s2:=substr(phrase,count,1);
x:=ascii(s1);
y:=ascii(s2);
x:=x-y;
if x<0 then
x:=x+256;
end if;
s1:=chr(x);
V_Temp:=concat(V_Temp,s1);
--dbms_output.put_line(s1);
end loop;
If the string that is to be encoded is longer than the key phrase, you mai decompose it in groups of letters that have the length of your key phrase and encode/decode each group using these functions.
Moreover, to make things more complicated, hard to break even when using a computer program, you may have an aditional field that holds the date&time when the record was changed, value that you may use to mix-up your key phrase, something like the following:
-- v$d being the date
nmixer:=to_number(to_char(v$d, 'mi'))+to_number(to_char(v$d, 'ss'));
nmixer:=mod(nmixer, 16);
phrase:=substr(phrase, nmixer, mod(nmixer, 9))&#0124; &#0124;phrase;
This is what I used and provides a means to actually encode and decode whatever data you need.
All these functions are stored in the DB in a wrapped package, to be sure not even the DBA can break it.
Some other way to check, say for a password is to use dbms_utility.get_hash_value, and compare the result of hash_value for the value entered by the user to the hashed value stored in the DB.
You may choose whatever seems fit for your purpouse.
Regards,
BD.

Similar Messages

  • Make a field encrypted like password field

    Hi,
    I want to make a text field encrypted like password field in find user form so that that filed comes as dot when a user enter that field. For that I made secret = true for that field. But after doing that the find user form is not working for that text field (search criteria). I think we need to decrypt that field as well to make the search functionality working. But I am unable to-do that.pleases help.

    In addition to secret = true, try to add noEncrypt = true on that Field.

  • OIM 9.1.0.2 - Notes field encrypted (OIM UI) ??????

    Hi Gurus,
    I have tried to add manually comments (Notes field) to some resource's tasks I have provisioned, but it seems to be encrypted because is displaying ********.
    If I look for the sch_note column I can see all the notes I have added in the OIM UI.
    Is there any configuration I can do to solve this?
    Best regards,

    No you cant. All you can do is create Fields with Labels and Values. You can make them as Read only text boxes though and put like "---------------------" in the default value, and give a field label name for a grouping.
    -Kevin

  • Date field encryption using Dbms_Obfuscation_Toolkit.DESENCRYPT

    Hi,
    I need to encrypt the date field in the table using Dbms_Obfuscation_Toolkit.DESENCRYPT .
    This is an table is an existing table and is accessed by many interfaces, so we cannot change the column type of this date field.
    Is there a possibility of encrypting the date field and store it in the same column (DATE type).
    And access this using Dbms_Obfuscation_Toolkit.DESDECRYPT.
    We are using Oracle 11.2.0.2.0.
    Thanks in advance.
    Agathya

    >
    Is there a possibility of encrypting the date field and store it in the same column (DATE type).
    >
    No - the DESENCRYPT procedure returns a RAW value which can't be stored in a DATE column.
    See DESENCRYPT Procedures and Functions in Chapter 82 (DBMS_OBFUSCATION_TOOLKIT) of the PL/SQl Packages and Types Doc
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_obtool.htm#i997215
    For what you want to do just use the ENCRYPT option of the CREATE TABLE or ALTER TABLE statements.
    See Using Transparent Data Encryption in the Advanced Security Admin Guide
    http://docs.oracle.com/cd/B28359_01/network.111/b28530/asotrans.htm#BABJJAIG
    >
    3.2 Using Transparent Data Encryption
    The following steps discuss using transparent data encryption:
    •Enabling Transparent Data Encryption
    •Setting and Resetting theMaster Encryption Key
    •Opening the Encrypted Wallet
    •Creating Tables with Encrypted Columns
    •Encrypting Columns in Existing Tables
    •Creating an Index on an Encrypted Column
    •Adding or Removing Salt from an Encrypted Column
    •Changing the Encryption Key or Algorithm for Tables Containing Encrypted Columns
    >
    Section 3.2.5.2 Encrypting an Unencrypted Column shows the ALTER TABLE statement for encrypting an existing column - this would leave the column as a DATE and you would work with it normally
    >
    3.2.5.2 Encrypting an Unencrypted Column
    To encrypt an unencrypted column, use the ALTER TABLE MODIFY command, specifying the unencrypted column with the ENCRYPT clause. Example 3-7 encrypts the first_name column in the employee table.
    Example 3-7 Encrypting an Unencrypted Column
    ALTER TABLE employee MODIFY (first_name ENCRYPT);
    The first_name column is encrypted with the default AES192 algorithm. Salt is added to the data, by default.
    You can choose to encrypt the column using a different algorithm. You can also specify NO SALT, if you wish to index the column.

  • Password encryption field

    Hi,
    How should I encrypt the password (say for Unix resource account. Is it a configuration or I have to code it?) before writing the user info into the OIM DB table?
    Thanks

    Granted that storing passwords is not 100% secure but if there are fields that you want encrypted you can specify field encryption in the form designer, the field will then be encrypted into the OIM database. You can also specify password field type.
    Ian.

  • Database encryption in multitenant

    Hi,
    We need to implement database encryption TDE on certain columns for SAP in multitenant environment.
    We have unique client id per customer.
    How does the 'database' encryption work in an multi-tenant environment? What if one company want certain fields encrypted and other does not.
    Regards,

    Yes Bitlocker
    http://technet.microsoft.com/en-us/library/ee832792(v=exchg.150).aspx
    Windows BitLocker (volume encryption)
    Windows BitLocker is a data protection feature in Windows Server 2008. BitLocker protects against data theft or exposure on computers that are lost or stolen, and it offers more secure data deletion when computers are decommissioned.
    Supported: All Exchange database and log files.
    Supported: All Exchange database and log files. Windows failover clusters require Windows Server 2008 R2 or Windows Server 2008 R2 SP1 and the following hotfix:
    You cannot enable BitLocker on a disk volume in Windows Server 2008 R2 if the computer is a failover cluster node. Exchange volumes with Bitlocker enabled are not supported on Windows
    failover clusters running earlier versions of Windows.
    For more information about Windows 7 BitLocker encryption, see
    BitLocker Drive Encryption in Windows 7: Frequently Asked Questions.
    Twitter!: Please Note: My Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

  • Security encryption for Original Airport Card?

    I recently purchased and installed an Apple Original Airport card(802.11b) for my iBook G3 running OSX Tiger(10.4.8). All available written documentation that I've obtained is telling me that the card is only 128 bit WEP encryption capable. However, I have been able to log onto my home network and access the internet via my router which is configured for WPA-PSK security encryption.
    Now, my question is? Do I have a problem with my home network security if I'm able to access it with a wireless card that is not supposed to be able to access it? Has anyone else encountered this?

    Hey Guys,
    I have a small problem with setting up our WIFI network!
    I have a G3 IBOOK Clemshell & a PC XP SP2 both on the WIFI Network. Right now i just removed the SSID and i enabled MAC filtering. But i want to secure our Network more, but how do i do that.
    How do i know, which WPA i need to take?
    I have a Belkin router/ Modem and i can choose WPA/WPA2-Personal (PSK)but than i have a field for "Authentication" what do i need to choose there? the options are: WPA-PSK, WPA2-PSK or WPA-PSK + WPA2-PSK. after that i have this field "Encryption Technique" and i can choose TKIP, AES or TKIP+AES! what to take???
    I know, so many questions,
    but first of all, i am quite new to APPLE and to WIFIs so a lot to learn, i really do hope, you can give me a hand!
    Best Regards,
    Jan

  • OIM 9102 BP12 Migration from WebSphere 6.1 to Weblogic 10.3

    Hello,
    We're planning to move(9102BP12) from WebSphere6.1 to Weblogic10.3.
    I found Oracle metalink which says -
    ================================================
    JDK Migration restriction:
    You can only migrate to JDKs that falls with in the same groupings.
    Group 1: Sun JDK, Oracle JRockit, HP JDK
    Group 2: IBM JDK.
    Example: If you are running OC4J using Sun JDK then you can migrate to Oracle WebLogic Server using Sun JDK, Oracle JRockit or HP JDK. However, you can't migrate to IBM JDK.
    ==============================================
    This is because the data in the OIM schema is encrypted using the IBM's encryption libraries which are not available for Sun JDK. What i understand is that the IT resource configuration details are encrypted with installed JDK. However, if we re-configure the IT resource with Weblogic setup (after installing oim on Weblogic poining to the existing database), we could proceed with this migration.
    Has anyone executed Websphere to Weblogic migration before for OIM? Any input will help.
    Thanks,

    Sorry for the delay as I got busy with my current project. Here are the answers to your questions.
    1) If i install WLS point to existing OIMDB, do i necessarily need to copy old .databasekey from WAS environment?
    <Abhi>: Yes, you will have to copy these files to the WLS environment.
    2) During WLS install, it'll ask for xelsysadm password. Will this password overrides to existing one in OIM DB? And later on when i'll try to login to OIM-WLS using this password, will that work?
    <Abhi>: Yes, but are you planning to have different passwords. The xelsysadm password is stored in OIM database. So if you update it, it will reflect in all the OIM middle-tier instances attached to this database.
    How about handling the encrypted values in WLS environment:
    (1) IT resource params - reconfigure them after migration - through design console in Weblogic environment
    <Abhi>: Yes. you may have to review the values in the IT resource params and the other atrifacts as RO, process forms etc. But most of the work will be done by the deployment manager export/import functionality.
    (2) User password and security Q&A - We're using SSO to login to OIM, so not a concern
    <Abhi>: You are good with this.
    (3) UDF encrypted attribute - After doing the migration, if we run the user trusted recon 1 more time.. then all the user attrs values would be overriden (including encrytped UDF).
    <Abhi>: If there is an encrypted UDF field, you will have to take care of this manually. BTW, is this field encrypted on the OIM side as well as the application side.
    (4) Encrypted object/process forms - i've pending task to analyze if we've any such attrs(process form encrypted 'password' to target(e.g. AD) - i could think of such cases)
    <Abhi>: If there is something like this, you will have to take care of this manually. Check the possibility of writing a custom code to go thru the OIM users and dump the decrypted data in some file. Later you can update the selective user data in the new environment
    Did you follow the similar process? What issues did you face because of the IBM to SUN JDK use?
    <Abhi>: Yes, I followed the same steps and did not faced much issues. It was pretty straight-forward. Just make sure that the export/import using Deployment manager is successful.
    Please let me know if you have more questions.

  • Managing users passwords with ADF

    Hi,
    We have created an user manager application wich edits Realm Users. Since we change the realm to use SHA encription we would like to have the password field encrypted before ADF updates the table ....
    There is a clean way of doing this ?
    So far we thought on overwriting the OnCommit method for the datapage and in there modify the request object but there is nothing like a request.setParameter( String, String ) .... and apparently is the request.parameter the one that ADF will endup sendind to the datafield ....
    Again, there is a direct way of doing this other than locating afterwards the viewObject Row and updating the unencrypted password with the encripted version ????
    Thanks,
    Omar

    Hi
    Put the code in YourEOImpl.java
    public void setPassword(String value) {
    String encryptedPassword = null;
    encryptedPassword = ....; // your encryption implementation
    setAttributeInternal(PASSWORD, encryptedPassword);
    Hope this help
    Regards,
    Nhut Trung

  • How to encrypt the text in password field in Oracle Forms version 6i

    Need help!
    How to encrypt the text in password field in Oracle Forms version 6i?
    one way is to change the settings in the property palette. Can somebody provide me some script to be run while the form is running which will enable the password to be encrypted?
    Thanks!

    Hello,
    Do you mean "hidden" (replaced with stars) or encrypted (that needs to be decrypted ?
    Francois

  • How to change the font and size in the fillable field of an encrypted PDF file?

    hi!
    I’d like to change the font and size in the fillable field of an encrypted PDF file I-485 from www.uscis.gov/files/form/i-485.pdf
    I’m using Adobe Acrobat Pro 9 in Windows XP. I firstly tried Adobe LiveCycle Designer, but the I-485 file requires password to be opened, which I don’t know.
    Then I tried to print it to a PDF file, and use the Typewriter tool to fill in the form. But got error message while printing it to PDF file:
    This PostScript file was created from an encrypted PDF file.
    Redistilling encrypted PDF is not permitted.
    The I-485 file can be exported to unencrypted postscript file, but got the same error message while trying to open the ps file.
    I don’t know much about pdf file, can anyone please help?
    Thanks a lot!

    Ask the creator of the file for a unprotected version.

  • Best practice for encrypting data in CRM 2013 (other than the fields it already encrypts)

    I know CRM 2013 can encrypt some values by default, but if I want to store data in custom fields then encrypt that, what's the best practice?  I'm working on a project to do this through a javascript action that when triggered from a form would reference
    a web service to decrypt values and a plugin to encrypt on Update/Create, but I hoped there might be a simpler or more suggested way to do this.
    Thanks.

    At what level are you encrypting?  CRM 2013 supports encrypted databases if you're worried about the data at rest.
    In transit, you should be using SSL to encrypt the entire process, not just individual data.
    you can use field-level security to not display certain fields to end users of a certain type if you're worried about that.  It's even more secure than anything you could do with JS, as the data is never passed over the wire.
    Is there something those don't solve?
    The postings on this site are solely my own and do not represent or constitute Hitachi Solutions' positions, views, strategies or opinions.

  • Custom report and encrypted fields

    Hi,
    I am writing a report that display all the Database IT resources in OIM system along with their connection URL, there is no input to the report and the output is just the name of the It resource and URL.
    The report works fine but the result is encrypted for connection URL, the field is encrypted in the OIM DB but I thought if one use reporting functionality of the OIM the result will be de-encrypted but i guess i was wrong.
    Can anyone please suggest how to display such a field unencrypted using reporting interface.
    Thanks,

    Just wanted to clarify that the field (URL) itself is not defined encrypted in the IT resource parameter definition, only the password field is defined encrypted but when you look inside the OIM DB for all the parameters are in either encrypted or hashed.

  • Is there a way to de-encrypt the password field in dba_users

    Is there a way to de-encrypt the password field in dba_users

    Can you be a little more specific. I've forgot my old password. Now, without the old password will it allow me to create a new password? I know that whenever i altered any user generally it won't asks for the old password. Then how oracle knows that who is authentic user and who is not? Can you explain it.
    Regards.
    Satyaki De.

  • Encrypt fields in Oracle 8.1.6 ??

    Hi. Has anyone tip how to encrypt a field in oracle 8.1.6.
    /Christer

    I am giving some example on this package.
    Example :
    =======
    -- encrypt.sql
    -- demonstrates the use of the dbms_obfuscation_toolkit by
    -- prompting a user for a password and encrypting and decrypting
    -- the data
    set serveroutput on;
    CLEAR BUFFER
    PROMPT Please enter a password - Must be 8 characters !
    PROMPT
    ACCEPT PASSWD
    DECLARE
    input_string VARCHAR2(16) := '&PASSWD';
    raw_input RAW(128) := UTL_RAW.CAST_TO_RAW(input_string);
    key_string VARCHAR2(16) := 'keepthesecretnum';
    raw_key RAW(128) := UTL_RAW.CAST_TO_RAW(key_string);
    encrypted_raw RAW(2048);
    encrypted_string VARCHAR2(2048);
    decrypted_raw RAW(2048);
    decrypted_string VARCHAR2(2048);
    error_in_input_buffer_length EXCEPTION;
    PRAGMA EXCEPTION_INIT(error_in_input_buffer_length, -28232);
    INPUT_BUFFER_LENGTH_ERR_MSG VARCHAR2(100) :=
    '*** DES INPUT BUFFER NOT A MULTIPLE OF 8 BYTES - IGNORING EXCEPTION ***';
    double_encrypt_not_permitted EXCEPTION;
    PRAGMA EXCEPTION_INIT(double_encrypt_not_permitted, -28233);
    DOUBLE_ENCRYPTION_ERR_MSG VARCHAR2(100) :=
    '*** CANNOT DOUBLE ENCRYPT DATA - IGNORING EXCEPTION ***';
    -- 1. Begin testing raw data encryption and decryption
    BEGIN
    dbms_output.put_line('> ========= BEGIN TEST RAW DATA =========');
    dbms_output.put_line('> Raw input : ' &#0124; &#0124;
    UTL_RAW.CAST_TO_VARCHAR2(raw_input));
    BEGIN
    dbms_obfuscation_toolkit.DESEncrypt(input => raw_input,
    key => raw_key, encrypted_data => encrypted_raw );
    dbms_output.put_line('> encrypted hex value : ' &#0124; &#0124;
    rawtohex(encrypted_raw));
    dbms_obfuscation_toolkit.DESDecrypt(input => encrypted_raw,
    key => raw_key, decrypted_data => decrypted_raw);
    dbms_output.put_line('> Decrypted raw output : ' &#0124; &#0124;
    UTL_RAW.CAST_TO_VARCHAR2(decrypted_raw));
    dbms_output.put_line('> ');
    if UTL_RAW.CAST_TO_VARCHAR2(raw_input) =
    UTL_RAW.CAST_TO_VARCHAR2(decrypted_raw) THEN
    dbms_output.put_line('> Raw DES Encyption and Decryption successful');
    END if;
    EXCEPTION
    WHEN error_in_input_buffer_length THEN
    dbms_output.put_line('> ' &#0124; &#0124; INPUT_BUFFER_LENGTH_ERR_MSG);
    END;
    dbms_output.put_line('> ');
    END;
    Result :
    ======
    SQL> start encrypt
    Please enter a password - Must be 8 characters !
    wildwind
    old 2: input_string VARCHAR2(16) := '&PASSWD';
    new 2: input_string VARCHAR2(16) := 'wildwind';
    ========= BEGIN TEST RAW DATA =========
    Raw input : wildwind
    encrypted hex value : 28EAA8E9E2CEA710
    Decrypted raw output : wildwind
    Raw DES Encyption and Decryption successful
    PL/SQL procedure successfully completed.
    null

Maybe you are looking for

  • AIR Intrinsic Classes-Tried and Proven Approach to building AIR applications   in the Flash CS3 IDE

    Hi everyone, For all of you out there who would like to develop AIR applications from the Flash CS3 IDE but aren't sure how to get those pesky intrinsic classes working, I have a technique that you can work with to create your classes and make fully

  • Editor won't open anymore

    I have been having such a hard time getting some actions installed in PSE8 on my new desktop.  I am operating in Windows 7.  When I tried to delete the MediaDatabase.db3 to rebuild a new one with the new actions, it crashed, and now will not open at

  • How much space does a new app take?

    My 16GB Touch is pretty full (about 360MB left after all the music is loaded). How much space does the typical app take up?

  • Blinking string in Swing

    hi all , I don't know how to blink the string in swing... the problem is I want to add one blinking string to JPanel when i pressed button.... if anyone knows please send me thankx

  • Upload files with international content

    I want to upload files with international content(many languages), from a single JSP. Any ideas? thanks, M.