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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:39:16+00:00 2026-06-01T12:39:16+00:00

Background: I’ve written a pair of .NET functions for AES encryption/decryption. I want to

  • 0

Background: I’ve written a pair of .NET functions for AES encryption/decryption.

I want to store the IV with the ciphertext in a single base64 encoded string, similar to as described here.

I’ve seen hashing this example where he appends the salt bytes to the end of the hash bytes, and then base64 encodes the new array. Then, when verifying the hash, he decodes the base64 string, and splits out the salt and hash bytes.

My question is: are there defined standards that describe how I should be performing the concatenation, so that my base64 encoded data could be parsed & decrypted by other programs? Or is it just up to me as the programmer to write my encrypt/decrypt functions to parse the data as I see fit?

The standards would answer questions like: Do I prepend or append the IV bytes to the ciphertext bytes?

My ideal function signature would look like:

// returns base64encodedCiphertextAndIV
string encrypt(string plaintext, string base64encodedKey)  

// returns plaintext
string decrypt(string base64encodedCiphertextAndIV, string base64encodedKey)
  • 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-01T12:39:17+00:00Added an answer on June 1, 2026 at 12:39 pm

    It is perfectly fine, and pretty much standard, to add the IV to the front of the cyphertext. The IV does not have to be kept secret, only the key has to be kept secret. If you are using CTR mode then it is very important that the IVs be unique within a given key. It is useful, but not so important, to have unique IVs if you are using CBC mode.

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

Sidebar

Related Questions

Background I have a pair of functions I want to use to animate some
Background We have an asp.net 4.0 web application written in C# that calls a
Background I am writing code in VS 2010, .NET 4, C#. Also, in case
Background: I'm testing a function within an ASP.NET 4.0 (Web Forms not MVC) and
Background: I am programming a .NET compiler (very similar to C#) for a school
Background - I want to extract specific columns from a csv file. The csv
Background I am writing a class library assembly in C# .NET 3.5 which is
Background: I have some existing apps in the App Store and I have just
Background: I want to check-out the source code from Cliche , which is stored
Background I have built a VB .NET application on the 4.0 Framework, part of

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.