• Questions
• # One way Encryption where no one can decrypt

Connor and Chris don't just spend all day on AskTOM. You can also catch regular content via Connor's blog and Chris's blog. Or if video is more your thing, check out Connor's latest video and Chris's latest video from their Youtube channels. And of course, keep up to date with AskTOM via the official twitter account.

Thanks for the question, GK.

Asked: November 08, 2019 - 9:36 am UTC

Answered by: Connor McDonald - Last updated: November 12, 2019 - 11:06 pm UTC

Category: Database Development - Version: 11g

Viewed 1000+ times

Whilst you are here, check out some content from the AskTom team: On Measuring Distance and Aging

Hi Tom,

Kindly suggest some one way encryption for the data in table,where no one can decrypt it?

Kindly help.

## and we said...

Sorry, I'm not following.

There is no such thing as "one way encryption". The definition of "encryption" is such that you *can* decrypt.

You might be referring to hashing? ie, the same input always maps to the same (garbled) output, and is non-reversible?

If that is the case, then check out either of:

dbms_obfuscation_toolkit
dbms_crypto

which contain routines to do hashes such as MD5, SHA-1, SHA-2 (SHA-256, SHA-384, SHA-512), MD4

There are examples of both on the AskTOM site just by searching

(1 rating)

## Reviews

### one way encryption

November 11, 2019 - 1:15 pm UTC

Reviewer: Laurent Schneider from Switzerland

If I have an input 123 and I encrypt this to ABC, no one can decrypt but me because I know how (I have the algorithm in my head). On the other hand if you have 123 and you produce hXz and noone can decrypt it, it is pretty useless.

Usually in encryption you have a key and an algorithm.

For instance, in its simplest form , XOR

I have value 5 and key 9
0x0101 (5)
XOR
0x1001 (9)
=
0x1101 (13)
5 XOR 9 = 13

and noone, without the key, can decrypt it

but with the key 13 XOR 9 = 5
0x1101 (13)
XOR
0x1001 (9)
=
0x0101 (5)

you should well protect your key (e.g. in a wallet), so nobody can access it.

While the algorythm evolves in the last 15 years, I still recommend Arup example : https://blogs.oracle.com/oraclemagazine/encrypt-your-data-assets

Cheers
Laurent

Followup

November 12, 2019 - 11:06 pm UTC

nice input

# More to Explore

##### PL/SQL

Check out more PL/SQL tutorials on our LiveSQL tool.