I've 8 bytes before encryption (for example: 01 02 03 04 05 06 07 08) and 8 bytes after DES encryption: 08 07 06 06 05 04 03 02 01. Is it possible to calculate the key?
121737
I know DES is outdated, but will is is secure in CBC mode? Can anyone help me understand why not?
22197
I have an encryption function   $$E(p) = (ap + b) \mod{26}$$  where the parameters are  $a=7$, $b = 10$, and $p$ is the plaintext letter.  I was asked to decrypt the ciphertext  LJMKGM    using this information.   So, I tried to solve in this way:   I wrote the letters and indexed them from 0 to 25. For each indexed ciphertext letter, I used this function to decrypt $$D(c) = (ac-b) \mod{26}$$ where $c$ is the number that represents the ciphertext letter.    I know that the plaintext is "please". For the first ciphertext letter, my method works, but for the rest it doesn't work.. what is my mistake?
104606
From the ECDH demo , if I generate a private key for Alice I can get _  P = 1175846487558108474218546536054752289210804601041   Which gives the following public key point.  X = 583857549063195252150226340830731484791130788759 Y = 1195037839477751118658084226553581900533276838164   For ECDSA public key compression the above coordinates would be prepended by 02 and the X coordinate would be used. So the compressed key for the above (based on X9.62) is:  02583857549063195252150226340830731484791130788759   If I only have the compressed key given above, how would I derive Y i.e. the uncompressed point?
7698
Is it possible to encrypt a message in such a way that multiple keys can independently decrypt it?  In other words:  Having knowledge of $key_1, key_2 ...key_N$, which are different symmetrical keys, is it possible to generate a ciphertext that can be independently decrypted using either $key_1$ or $key_2$ or $key_N$, in such a way that the length of the ciphertext is less than directly proportional to $N$?
46859
I've always been interested in encryption but I have never found a good explanation (beginners explanation) of how encryption with public key and decryption with private key works.  How does it encrypt something with one key and decipher it with another key?
1900
While calculating RSA encryption key we take modulo $\varphi(n)$ rather than modulo $n$. I can’t understand why it’s done this way.
93462
I know that rsa normally is made to make it with big integers, but i trying to make the algorithm myself (with the help of wikipedia) and I´m making it with small numbers to track the problems easily.  The problem is that sometimes the decryption of the crypted message is wrong! Exactly when I choose p=11 and q=5, the rest goes like this:  n=55 euler(n)=40 = (p-1)(q-1) e=13 d=37   the crypted message (using message=65) is:  c=10   and using the chinese reminder theorem (wikipedia´s advise):  Dp=7 Dq=1 Qinv=9 m1=10 m2=0 h=2   and the decrypted message is:  message=10 !!!!!   It´s a problem of the choosen prime numbers? I think that the rest I made it fine, I also check it with rsa calculator:   I know also that to choose d and e there are more options, but the choosen ones they would be fine too. Maybe there is some other condition that is not in the wikipedia?
18460
Assume there is a public-key encryption scheme $(KeyGen, Enc, Dec)$ with perfect correctness (i.e., for all messages M and valid key-pairs (PK,SK), we have $Dec_{SK}(Enc_{PK}(M))=M$).  Will there always be a function $A$ such that for all messages M and valid public-keys PK, $A_{PK}(Enc_{PK}(M))=M$?  In other words, can a computationally unbounded adversary decrypt the message, having only the public key?
82331
From , there are $14$ bytes specifying the file format of the key. I am still quite confused about the format bytes. For example, the following public key 30 82 01 0a 02 82 01 01 00 8e a3 d1 c7 9c 86 05 52 3d 70 9a 5b 24 8a 6e ab 8f 5d 8d 9a 44 5f 25 78 c7 ba bd 3a a6 e1 36 b8 55 88 18 d7 ea e8 14 2c 68 8f e7 fe 94 4c f3 fd ad 0b e6 d2 eb 9e d2 66 b4 3a 3b d1 bb 5d d5 2a 53 7e 0f 1d ba ec 03 29 9d 47 50 3b 99 fb 4a 3a 80 a2 23 3e d7 11 e3 de a8 8d ab 7c 90 d0 92 af 36 b8 8b 28 fd 80 ec bc 37 6d 23 44 86 4e 28 19 1d 18 37 af 44 a9 40 b3 f6 e7 6c ad 56 5d 6f ff 3b e3 a5 cc 23 5c 54 2a 47 28 5b 29 f3 45 8e 69 98 ad 57 45 2e 60 bd ac 55 fc 35 e8 47 9f 98 0d f9 ea 9d 55 35 c9 db af 24 d2 bc 18 12 02 53 d6 aa ef 9c c9 11 c9 8e d7 7c 4f 2f 22 0f 66 b1 bf 06 a5 fa 87 22 9f ff f6 20 75 e7 51 87 26 30 c2 e1 a5 30 2c a1 fc 47 a5 f7 a5 38 d3 cc 8d 0e ee 5a 54 ee a2 f9 ff d0 0a 0f 18 7f 94 d2 04 5e 1f 25 ca be 4e 30 c3 40 00 ed a4 ce 58 ab 23 39 2d 02 03 01 00 01 is taken from google's certificate. The first byte $30$ means it is a sequence. Then I don't know what is the meaning from 2nd byte to 9th byte. Can anyone explain to me? UPDATE: The 2nd byte (82) means that the following 2 bytes give the length of the sequence. The 5th byte tells us that it is an integer. The byte following it tells us the length and the value of the integer (I guess). Then the rest I have no idea. Also what do the last 3 bytes stand for? I can't find format start with $01$.
94353
With a Cipher text of   7ECC555AB95BF6EC605E5F22B772D2B34FF4636340D32FABC29B  73CB4855BE44F6EC60594C2BB47997B60EEE303049CD3CABC29B  64C6401BAF45F6A930435F3DF875C4E102F8742A45C824AFCA9B  7AC24F5EAF17F0A0754D5834BC3CC3A90ABD7B2A52C222ABC89B  72C24A52B550B3B8624D4F22F86BD2B30ABD642C498122A1D29B  73CC5457BF17E7A4750C5423B178D0A44FFF756355C03CABC28A  74CC0155B443B3A8795F4224AA7E97B507F2632606CF3FA0D59B   It is assumed that each line is a different message encrypted with the same pad.  I have tried countless lengths of words that are supposed to lead me somewhere to the decryption of this cipher, however isn't it just downright impossible to "guess" your way to the answer?  Crib dragging does not seem to work since there seem to be too many possibilities…
110846
While developing some code that uses the .NET AesManaged algorithm, I made some mistakes but was surprised at the results.  My encryption was correct.  I was generating a random IV block and writing it to the file (without encrypting the IV).  Then I was encrypting the plaintext and writing it.  The decryption was wrong though... instead of reading the first block from the file an using it as an IV, it was just using a random IV and decrypting everything.  The first block came out gibberish but the 2nd (and subsequent) ones were decrypted properly!  Why would this be?  And even weirder... when I tried to fix it by encrypting the IV in the encryption code (instead of writing the IV unchanged) the decryption result was the same!  (gibberish then correctly decrypted blocks).  Although I eventually fixed my code, how do these results make sense?
4850
Given a CBC ciphertext and IV, how can I find the encryption key?  We are limited with an 8 chars key, each char in the range of [a..h], so I can generate every possible key (these are only $8^8 = 2^{24}$ (about 4 million) different possible keys).  How would I go about finding the correct one though?
50340
I've already sent my correct solution to :  &quot;Let us see what goes wrong when a stream cipher key is used more than once. Below are eleven hex-encoded ciphertexts that are the result of encrypting eleven plaintexts with a stream cipher, all with the same stream cipher key. Your goal is to decrypt the last ciphertext, and submit the secret message within it as solution. Hint: XOR the ciphertexts together, and consider what happens when a space is XORed with a character in [a-zA-Z].&quot;  I managed to get the key by XORing ciphertexts #1 and #2, then XORing the result with the string &quot; the &quot; at each possible position.  Combined with a lot of guesswork, this gave me the first plaintext. My question is: What would I have to do if I want to follow the hint? I know that if I XOR a space with a letter, I change the case of the letter, but then what? I don't understand how I can recognize spaces!  Suppose I see a letter in $c_1 \oplus c_2$; how can I tell if there was a space in one of the plaintexts?
100011
I'm wondering why we use encrypt-decrypt-encrypt (EDE) sequence in 3DES (also known as DES-EDE, TDES or TDEA) with three keys instead of three times encryption (EEE) with three different keys?
104204
If we encrypt a message twice with symmetric key $k_1$ first and then $k_2$ like $E_{k2}\{E_{k1}\{m\}\}$ , ideally we should decrypt with $k_2$ first and then $k_1$ but is it possible to decrypt with $k_1$ and then with $k_2$ ?  Using any of the AES Modes preferably ?
44635
I want to know if a larger block size increase the security of the block cipher?
12314
Total Crypto Noob here.  I was wondering why in ECDSA the Signing Key is so much (half of) shorter than the Verifying key?  Lets look at some python code:  import ecdsa import binascii signing_key = ecdsa.SigningKey.generate(curve=ecdsa.SECP256k1) verifying_key = signing_key.get_verifying_key() print(binascii.hexlify(signing_key.to_string())  print(binascii.hexlify(verifying_key.to_string())  b'662ab496304f2d99aca32d813dbcba3c3ae10ab2b3359fbe43b05ee40b458cec' b'6632feae645469c16cb31d7e1364cae247bd4322040d7089476614399bcf59b2fccf5060686ab09ee64e1b768ba037184e9a87001a4897a745721f99000b44ee'   lets assume I send verifying keys over the network or store them someware, it would be nice if they were not so long. Is there a way to compress them?  I assume it would be really bad to use the keys vice versa, but I don't understand why.