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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:45:42+00:00 2026-05-19T02:45:42+00:00

…and what the nice folks at OpenSSL gratiously provide me with is this. :)

  • 0

…and what the nice folks at OpenSSL gratiously provide me with is this. 🙂

Now, since you shouldn’t be guessing when using cryptography, I come here for confirmation: what is the function call I want to use?


What I understood

A 128 bits key is 16 byte large, so I’ll need double DES (2 × 8 byte). This leaves me with only a few function calls:

void DES_ede2_cfb64_encrypt(const unsigned char *in,
       unsigned char *out, long length, DES_key_schedule *ks1,
       DES_key_schedule *ks2, DES_cblock *ivec, int *num, int enc);

void DES_ede2_cbc_encrypt(const unsigned char *input,
       unsigned char *output, long length, DES_key_schedule *ks1,
       DES_key_schedule *ks2, DES_cblock *ivec, int enc);

void DES_ede2_cfb64_encrypt(const unsigned char *in,
       unsigned char *out, long length, DES_key_schedule *ks1,
       DES_key_schedule *ks2, DES_cblock *ivec, int *num, int enc);

void DES_ede2_ofb64_encrypt(const unsigned char *in,
       unsigned char *out, long length, DES_key_schedule *ks1,
       DES_key_schedule *ks2, DES_cblock *ivec, int *num);

In this case, I guess the function I want to call DES_ede2_cfb64_encrypt, although I’m not so sure — I definitely don’t need padding here and I’d have to care about what ivec and num are, and how I want to generate them…

What am I missing?

  • 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-19T02:45:42+00:00Added an answer on May 19, 2026 at 2:45 am

    DES_ede2_cbc_encrypt is the normal choice. As for ivec (an 8-byte array), one of its functions is to prevent the same message encrypting to the same ciphertext in a predictable way; if an adversary can tell from two ciphertexts whether or not they encrypt the same plaintext (or just the same initial blocks), they might be able to use that information. So you use a different ivec for each message; it doesn’t have to be secret, just different. If you’re really sure that you don’t need it, you can set it to eight zero bytes. (For instance, if you’re just using the key once, it’s safe to do this.)

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

Sidebar

Related Questions

I have an element like this: <span class=tool_tip title=The full title>The ful&#8230;</span> This seems
Since AVD tools 16 I'm getting this warning: Replace ... with ellipsis character (...,
so I did $subject = 'sakdlfjsalfdjslfad <a href=something/8230>lol is that true?</a> lalalala'; $subject =
what about this one: I want to format the currentTime displayed by a videoPlayer
An Arabic name shall be sent via SOAP. The name is encoded like this:
I have a PDB file. Now it has two parts separated by TER. Before
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a table of data (in this case property rents) and want to
After much research, I have found that Laravel is very nice. I have a
I'm using a plugin to show only the first 500 characters of a text...

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.