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

  • Home
  • SEARCH
  • 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 3357792
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:40:31+00:00 2026-05-18T02:40:31+00:00

My .Net application need to communicate with Linux based system which is using following

  • 0

My .Net application need to communicate with Linux based system which is using following command line to encrypt their messages:

openssl enc -a -e -salt -des3 -pass pass:abc123

How would be equivalent code to encrypt/decrypt messages in c# look like?

I understand that I should use TripleDES in CBC mode with PKCS7 padding. What I don’t know is what block size and initialization vector (IV) should I use.

Also I am confused how should I derive key from password. Should I use PBKDF1 or PBKDF2 and what salt should I use?

So what seems to be a quite standard job ends for me with all night puzzle. Can anybody help me?

  • 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-05-18T02:40:32+00:00Added an answer on May 18, 2026 at 2:40 am

    So here is the trick:

    > openssl enc -a -e -salt -des3 -P -pass pass:abc123
    salt=17685C0658F85BA4
    key=1CB6E5A0AA4953EC2323CBA021EF008C9193F5F29990DE87
    iv =9148EB5B2BF2E9B2
    

    If I feed TripleDES algorithm the output is almost same as openssl output. Only difference is extra 16 bytes at the beginning of the openssl output. The first eight of these bytes is “Salted__” text and the second eight is the salt.

    Salt is random. So how should I derive key and iv from password and salt? PBKDF1 nor PBKDF2 doesn’t qualify.

    So here is the second trick:

    A = MD5(pwd + SALT)
    B = MD5(A + PWD + SALT)
    KEY + IV = A + B
    

    Plus sign stands for concatenation, Key is 24 bytes long and IV is 8 bytes long.

    I learned these trick from Deusty blog where he do similar stuff with AES.

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

Sidebar

Related Questions

I use a System.Timers.Timer in my Asp.Net application and I need to use the
We need to replace the menu system in our main ASP.NET application. So naturally
I'm working on an asp.net application which uses Lucene.net I need to highlight the
I have a client/server application that communicates with .Net remoting. I need my clients
I'm working in a .net application where we need to generate XML files on
I need my .net application to use the .html extension instead of .aspx I'm
I need to write a .NET application that listens to a SMS message ,
I need to use a dll in my asp.net application. How do I load
I am developing a Windows .NET application (WinForms) and I need to simulate a
I am working on an ASP.NET MVC application where I need to export data

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.