سؤال

I have a question that looks weird even to myself.

I am translating a program written about 15 years ago to C#. A part of this program is key generation and storing it in a file medium.

Here is the part that I am concerned. This specific method generates a 3DES derived key from a master 3DES key that we call it Key1.

This method uses Key1 to wrap Key1 which we call it wrap1. in next step it uses the Key1 to wrap wrap1 which we call it wrap2. wrap2 is stored in medium and Key1 and wrap1 is lost.

From my understanding, a wrapped key should be unwrapped before being used for encryption and decryption; However I'm not sure if we can unwrap a key without having the key that used to wrap it.

Please note I do not have access to the part of program that uses this key to see how it is used.

Question is it possible to retrieve the key that is wrapped this way?

هل كانت مفيدة؟

المحلول

Why? Wrapping a key with itself is pointless. It's like buying dehydrated water: just add water to reconstitute. You need the key key1 to decrypt wrap1 -- and then what do you get back? You get back key1, which is what you already had.

Of course, someone who doesn't have the key (and can't guess it) cannot decrypt the wrapped key. That's how key wrapping works. So, no, given just wrap1 or just wrap2, you cannot deduce the value of key1.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top