Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8584513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:47:28+00:00 2026-06-11T21:47:28+00:00

I have oracle database to move on to new postgresql server. Some tables are

  • 0

I have oracle database to move on to new postgresql server.

Some tables are having field sesitive and those are all encryted through DBMS_OBFUSCATION_TOOLKIT.DESENCRYPT/DESDECRYPT.

The problem is here. The size of postgresql’s encrypted data size(bytea type) should be the same with oracle’s.

I tried to get it done with aes(encrypt/decrypt) which takes almost three times larger than raw data.(oracle takes 16byte with des algorithm, postgresql takes 33byte with aes and the raw data is of 13byte.)

I tried the postgresql crypt also, but the manual doesn’t metion the way of decrypting it back limiting 8byte of raw data size.

Now i really need encrypt method which takes as small encryted data size as possible and provides decrypt method also.

Is there a good way or the other options for me???
Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T21:47:29+00:00Added an answer on June 11, 2026 at 9:47 pm

    Crypt and DES are old cyphers and should not be used

    Plain old DES is an obsolete algorithm. You can’t really usefully compare it to AES128; it’s like complaining that a SHA256 hash is bigger than an MD5 hash – yep, it is, but only one of them might slow the attacker down for a while. DES was widely considered weak even in 1999 and should never be used in new applications. Do not use it.

    I don’t think it’s a good idea to seek an encryption method that “provides the smallest data size possible” – because it’s basically a waste of time to encrypt data using DES. Why not use ROT13 (caesar cypher)? The “encrypted” result is the same size as the input, pity the encryption can be broken by a 3-year-old.

    crypt is of a similar vintage. The old UNIX crypt hashing algorithm is … elderly … and totally unsuitable for any new application. Hashes should be SHA256 at minimum, really.

    Crypt is a one-way hash

    As for not being able to figure out how to decrypt crypted data: crypt isn’t an encryption algorithm, it’s a cryptographic hash function or “one way hash”. One way hashes are suitable for verifying that data is unmodified, comparing to a stored salted hash for password authentication, for use in challenge-response authentication, etc. You cannot decrypt crypted data.

    Deal with the size

    Use a decent cryptographic function and live with the size increase. bf or aes128 are about the weakest you can reasonably use.

    Personally I prefer to do my encryption/decryption in the app, not in the DB. If it’s done in the DB the keys can be revealed by pg_stat_statements, in the logs by log_statement or errors, etc. Better that the key never be in the same place as the stored data at all.

    Most programming languages have good cryptographic routines you can use.

    It’s hard to offer any more advice as you haven’t really explained what you’re encrypting, why, what your requirements are, what the threat(s) are, etc.

    Passwords?

    If you’re storing passwords, you’re probably doing it wrong.

    • If possible, let someone else do the authentication:

      • OAuth or OpenID for Internet

      • SSPI, Kerberos/GSSAPI, Active Directory, LDAP bind, SASL, HTTP DIGEST, etc for intranet

    • If you really must do the auth yourself, add a salt to the passwords and hash the result. Store the hash and the salt. When you must compare passwords, salt the new plaintext from the user with the same salt you used for the stored hash, hash the new password+salt, and see if the hash is the same as what you stored. If it is, they gave the right password.

    • You almost certainly don’t need to recover cleartext passwords. Implement a secure password reset instead. If you really, really must, use a decently secure algorithm like aes to encrypt them and think carefully about key storage and management. See other posts on SO about key storage/management with pgcrypto.

    See also:

    • Secure method for storing/retrieving a PGP private key and passphrase?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an oracle 10g database that has 2 tables: a REBATES table, and
I have a very large Oracle database, with many many tables and millions of
I am using oracle database. If have a large transaction to make (700 tables,
Let's say you have an Oracle database running on production-backup. You want to move
I have oracle database configuration in tomcat's server.xml <Resource name=jdbc/sgfdb auth=Container driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@databaseurl:1521:schema username=username
I have a oracle database installed on a server, I want to export one
I have two tables (A and G) in an Oracle database that can be
Context I have an Oracle 11g database instance and a SQL Server 2012 instance
We have an Oracle database here that's been around for about 10 years. It's
I have an oracle database populated with million records. I am trying to write

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.