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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:37:17+00:00 2026-05-24T03:37:17+00:00

I’m looking to encrypt some data using multiple ciphers (ie, AES, Serpent, Twofish…), and

  • 0

I’m looking to encrypt some data using multiple ciphers (ie, AES, Serpent, Twofish…), and I want the user to be able to choose which ciphers are used and in what order. Are there any standards available for defining the metadata? My understanding is that what I dont want to do is prefix each layer with a magic number indicating the type of cipher and parameters used in the next layer because it will expose me to a plaintext attack. I took a peak at the PKCS #8 RFC, and it appears that only a single layer of encryption is supported here:

  EncryptedPrivateKeyInfo ::= SEQUENCE {
    encryptionAlgorithm  EncryptionAlgorithmIdentifier,
    encryptedData        EncryptedData }

I suppose I could just define the encryptionAlgorithm to be an array of values, but I want to make sure there isnt already a standard defined somewhere that I have missed.

  • 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-24T03:37:18+00:00Added an answer on May 24, 2026 at 3:37 am

    PKCS#7 and its successor CMS allows for multiple layers. The EncryptedData contains an EncryptedContentInfo that when decrypted can contain another EncryptedData. This is usually used to combine encryption and signing, but there is no reason that it cannot be used for multiple layers of encryption (though support in other implementations may vary).

    XML Encryption is another common standard for cryptographic metadata. It has no direct support for nesting encryption layers, but since it relies on the specification of the enclosing schema to specify the expected format of the encrypted data, there is no reason it could not specify multiple layers.

    The OpenPGP Message Format is the final standardized format I can think of. Like CMS it supports nested layers of encryption (in theory – implementations might or might not support it).

    Neither of the formats supports specifying nested encryption-layers upfront: the metadata for the nested layers will be encrypted, so you do not avoid the known-plaintext weakness. However, since you should always choose an algorithm that is safe against known-plaintext attacks anyway, I do not see that as a big problem.

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

Sidebar

Related Questions

I have some data like this: 1 2 3 4 5 9 2 6
I'm looking for suggestions for debugging... If you view this site in Firefox or
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm making a simple page using Google Maps API 3. My first. One marker

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.