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 97727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:03:36+00:00 2026-05-11T00:03:36+00:00

Using PyCrypto (although I’ve tried this in ObjC with OpenSSL bindings as well) :

  • 0

Using PyCrypto (although I’ve tried this in ObjC with OpenSSL bindings as well) :

from Crypto.Cipher import DES import base64 obj=DES.new('abcdefgh', DES.MODE_ECB) plain='Guido van Rossum is a space alien.XXXXXX' ciph=obj.encrypt(plain) enc=base64.b64encode(ciph) #print ciph print enc 

outputs a base64 encoded value of :

ESzjTnGMRFnfVOJwQfqtyXOI8yzAatioyufiSdE1dx02McNkZ2IvBg== 

If you were in the interpreter, ciph will give you

'\x11,\xe3Nq\x8cDY\xdfT\xe2pA\xfa\xad\xc9s\x88\xf3,\xc0j\xd8\xa8\xca\xe7\xe2I\xd15w\x1d61\xc3dgb/\x06' 

Easy enough. I should be able to pipe this output to OpenSSL and decode it :

I test to make sure that the b64 decode works –

python enctest.py | openssl enc -base64 -d + python enctest.py + openssl enc -base64 -d ,?Nq?DY?T?pA???s??,?jب???I?5w61?dgb/ 

Not pretty, but you can see that it got decoded fine, ‘dgb’ and ‘Nq’ are still there.

But go for the full thing :

python enctest.py | openssl enc -base64 -d | openssl enc -nosalt -des-ecb -d -pass pass:abcdefgh + python enctest.py + openssl enc -nosalt -des-ecb -d -pass pass:abcdefgh + openssl enc -base64 -d bad decrypt 15621:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:evp_enc.c:461: j?7????vc]???LE?m³??q? 

What am I doing wrong? I’ve tried using -k abcdefgh -iv 0000000000000000 or typing in the password interactively – same problem.

  • 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. 2026-05-11T00:03:37+00:00Added an answer on May 11, 2026 at 12:03 am

    echo ESzjTnGMRFnfVOJwQfqtyXOI8yzAatioyufiSdE1dx02McNkZ2IvBg== | openssl enc -nopad -a -des-ecb -K 6162636465666768 -iv 0 -p -d

    6162636465666768 is the ASCII ‘abcdefgh’ written out in hexadecimal.

    But note that DES in ECB mode is probably not a good way to encode passwords and also is not the ‘DES crypt’ you may have heard of being used on Unix systems. (For passwords, it is usually better to use a hard-to-reverse algorithm (checking the password by regenerating the result instead decrypting the stored password). Even if you do need to be able to decrypt these encrypted passwords, single-DES and especially ECB are poor choices as far as confidentiality is concerned.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 118k
  • Answers 118k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer No you don't need to revert, it will be quite… May 11, 2026 at 11:31 pm
  • Editorial Team
    Editorial Team added an answer An anonymous namespace is logically equivalent to namespace _TU_specific_unique_generated_name {… May 11, 2026 at 11:31 pm
  • Editorial Team
    Editorial Team added an answer Database should always be designed and initially implemented in 3NF.… May 11, 2026 at 11:31 pm

Related Questions

Using PyCrypto (although I've tried this in ObjC with OpenSSL bindings as well) :
I haven't a clue about encryption at all. But I need it. How? Say
First, my question is not about password hashing, but password encryption. I'm building a
Using online interfaces to a version control system is a nice way to have
Using PyObjC , you can use Python to write Cocoa applications for OS X.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.