instruction
stringlengths
33
27.2k
First off, this feels like it should be a common question, so I'm sorry if I've missed an older thread. Note that in my question, I'm talking about "implementing AES" rather than "designing AES2" or something. I am of course familiar with the saying that you should "never implement your own crypto" and I've recently al...
im trying to work on key agreement schemas on embeded systems. for diffie hellman, ive written a 256 bit multiplication, on AVR core it takes about 2 seconds on 1Mhz frequency, lets say my algorithm is weak and it'll work in 1/10 of this time. if we multiply the clock and say were working on 3Ghz PC, we have to exponen...
I want to encrypt very small integers in the range 0-44 using the Paillier cryptosystem. Is there a way to select p, q (g=n+1 anyway) and mostly r in such a way that I can guarantee that the encrypted values are still 32-bit integers? Also, I have trouble understanding how to select r. According to wikipedia, the rando...
I was trying to understand Bleichenbacher’s CCA attack and thought of work it out in python. Can some one throw some light on the the logic behind the oracle used to check PKCS conformation? Will a cipher's parity check yield anything useful?
I am currently working on a python script that does image steganography, altering the least significant bit on each channel of the image. Now imagine encrypting a file with a bunch of null bytes, or if you want a more realistic scenario, text that has a lot of repeating sequences in it (whole words / characters); Analy...
If you have a TRULY random key (in binary) and you have a text (in binary) that you want to encrypt. Can you simple XOR the key and the text? Is that secure? How secure?
I have this problem: In RSA algorithm considering $n=33$ (modulus) and public exponent $e=3$, calculate the corresponding private exponent $d$. I know that $d = e^{-1} \pmod{\varphi(n)}$ and $\varphi(n) = (p – 1) (q – 1)$ but I don't know $p$ and $q$. How can I do this?
I'm interested in the property of involution in block ciphers and how one would go about constructing one. Creating a cipher where $E_K(E_K(M))=M$ for any $M$ and $K$ isn't an obvious task and the use of round keys makes it seem like this is an impossible task without undermining the security of the thing. What is my b...
The given examples below are dummy and in English. They are mainly for place holding as this is a concept question rather specific example based Given AES has a block size of 128 bit (16 letters of English) and assume I am using the 128 bit key version without an IV. Assume I have the plaintext hellohowareyoutodayihope...
This is a purely mathematical question on RSA encryption. Having $e$ as the public key exponent and $n$ the modulus of a public key. Can I recover the md5sum of the private key $d$ (inverse of $d$ according to the modulus.) Thanks for your help.
Can somebody please explain how an initialization vector works. My current understanding is that it is used to prevent 2 of the same messages looking identical after encryption, but isn't this the same as what a salt does? How is it different from a salt?
Suppose I have a ciphertext that I know is encrypted using an affine cipher in $\mathbb{Z}_{26}$. The plaintext begins with es and the corresponding ciphertext is FX. How can I calculate the key?
I need to implement AES_GMAC encryption and decryption in c/c++ programming language. For the implementation, I have referred following document: http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/gcm/gcm-spec.pdf But It seems that it contains esoteric information specific for people with cryptographic ...
What both parties have: Server Master Secret (MS) Server supported versions (Svers) Agreed upon version (ver) Client Master Secret (MS) Client supported versions (Cvers) Agreed upon version (Ver) What I am planning on doing: Client sends Cvers to Server. Server checks what version to use (the highest version the 2 shar...
Can a cipher that is vulnerable to an known plaintext attack be made secure by adding an additional XOR-encryption? That is: suppose I have an (w.l.o.g. symmetric) encryption algorithm E were the attacker can retrieve the rest of the message, if he knows any part of it (but secure if he doesn't). I would try to addres...
I know and I have understood the details of RSA, elliptic curve cryptography, (EC)DH and (EC)DSA. I keep reading everywhere that (if we don't consider non-deterministic computers) "ECC can achieve the same level of security as RSA, but with lower key sizes". While I can guess why this is true, how do we mathematically ...
I want to get a group element $h$ on the elliptic curve secp256k1. The important thing is that no one should know the discrete logarithm of $h$ with respect to $g$. That is, $h$ should be created from a public beacon and not by exponentiating $g$. What's the best way to do this?
In case of using SSL the certificate server has a primary key and a public key that is published to all clients - as far as I understood. So in this case when message is encrypted by public key (on client side) only the owner of private key (which is the server in this case) has ability to decrypt it. But I do not unde...
MD5 collisions have been out for some time. In spite of this, HMAC-MD5 is still secure for authenticating data1. This illustrates a strength of the HMAC construction, it does not require that the hash function be (weakly) collision resistant. Recently, Dan Kaminsky posted a simple method for finding HMAC-MD5 collisions...
Currently my knowledge about Elliptic curve is quite limited to the textbook and I don't know how a practical Elliptic curve cryptosystem works. I read an example about key exchange using Elliptic curves. And I am wondering what is the public information (key) of a practical Elliptic curve cryptosystem. First, the equa...
I'm trying to devise a good security scheme to protect comms over Wi-Fi. Right now, I have 2 devices that already communicate via UPnP but I need to secure this communication. I've come up with this: Once the client sees the other host, picks a pair of Diffie-Hellman parameters (out of 1000 pregenerated pairs of $g$ a...
Initially let me state that this is an atypical type of cryptographic encoding. First I break up my key into three parts $k = {W,\overrightarrow{b},\alpha}$. the $W$ is simply a $n \times n$ matrix, $\overrightarrow{b}$ is a vector of size $n$ and $\alpha$ is a scalar. My message is also a matrix with dimensions $k \t...
Suppose I have a local file and it is encrypted with a symmetric key derived from a strong passphrase, unique salt and $x$ number of PBKDF (e.g. Scrypt) iterations. I am interested in keeping this file a secret for a very long time. Suppose the user specifies the number of iterations themselves e.g. a random number bet...
Imagine there is a protocol supporting outosurced multi party computation. There are three parties involved in the protocol: client $A$, client $B$ and a server. Client $A$ and $B$ send their private sets to the server. The server computes the private set intersection and returns it to $B$. $A$ and $B$ are honest but s...
I am kind of confused whether should a newly generated key pair be stored in a keystore or in just a normal plain text file? From what I read from online source, there are serveral explainations about what the keystore actually store. some says it stores the certificates only while some says it stores the key pair as w...
I'm working on implementation of keccak algorithm and have one problem. Tell me please, takeing an example "test": will state (before block permutations, but after padding - pad10*1) look like this: {80...0 0 0 0 0} {0 0 0 174736574 0} {0 0 0 0 0} {0 0 0 0 0} {0 0 0 0 0} or maybe like this: {80...0 0 0 0 0} {0 0 0 0 0}...
Consider the following code snippet: <?php session_start(); if (md5($_POST['password']) === '550b1f8802ca3d7a987fc46a2af408c3') { $_SESSION['loggedIn'] = true; } header("Location: /"); exit; If an attacker doesn't know the hash, they should still be able to leak bits of the hash via timing information (and by...
I have read many pages about encryption but I am really stuck on this. For access control to a building I want to print a 10 character ASCII code on a ticket (as a barcode). The barcode reader (controlled by an Arduino or mini PC) is not connected to the PC which creates and prints the barcodes. When both server and ...
I am trying to create a secure Bluetooth Low Energy connection. The peripheral server (the main device other people would connect to) would need to service many clients (users) and due to hardware limitations, I would not be able to let the hardware manage security (essentially, it has a limit of 4 keys, i.e., 4 users)...
I need to know in an outsourced two party computation where honst $A$ and $B$ outsource their private and secure data to a malicious server, why we need to design a simulator that interacts with an adversary who exists in real model? See the paper cited below as an example: https://eprint.iacr.org/2011/272.pdf
First of all I would like to say hello to all StackExchange users. So far I've been stalking the forum for some time, now it's time to leave the shadows. In my master thesis I'm writing about heuristic methods in cryptanalysis, etc. ant colony algorithms or genetic algorithms. So far all methods seems to be quite intui...
How can I apply the Meet-in-the-Middle attack to the 3DES algorithm, and why does the literature say that 3DES is more secure than DES?
I would be very grateful for any help. I cant figure out why (probabilistic) public key encryption schemes can never provide perfect secrecy? Any Ideas? Excerpt: In contrast to the private-key setting, perfectly-secret public-key encryption does not exist. (We stress that this holds regardless of how long the keys are ...
Apologies for the obviously ridiculous question but I need to know where I'm going wrong here. For RSA, we compute $n=pq$ for primes $p$ and $q$. We then choose an $e$ such that $gcd(e, \varphi(n))=1$ and compute $d$ such that $ed = 1 \mod \varphi(n)$. The public key is $(n, e)$ and private key is $(\varphi(n), d)$. I ...
I have such problem: party $X$ has an amount of money $M$, which it needs to share with $n$ other parties. Every week the amount of money is different. Let say not, that I am a party A, which is one of those $n$ parties which are waiting for their money from $X$. Do you maybe know any protocol or commitment schema, wh...
According to RFC 3526 & RFC 2412, the prime and the generator are defined, but there is no recommended length for the parameters of random number $x$. What is the recommended length of random number $x$? In my case, I set the length of $x$ at 160 bits with a 1024- & 2048-bit prime. Is it safe?
I have elliptic curve of equation $y^2 \equiv x^3 -x $. And the coordinate of points $Q$ and $P$. I want to solve $Q=[k]P$ (where $k$ is the unknown) by testing all possible $k$. Is this the right approach to solve this problem? Edit I understand from comments that this is known as Elliptic curve discrete logarithm pro...
I've been playing around with the Matasano crypto challenges (cryptopals.com). I had a couple false-starts on the challenge that has you creating a program to calculate the key size of a XOR encrypted file using Hamming Distance of the bits (Index of Coincidence). After some head banging and pen and paper work on graph...
The specifications for RSA state: $P^{\phi(N)} \equiv 1 ~mod~N$ if and only if $P$ and $N$ are coprime. Here $P$ is the plaintext and $N$ is the product of two suitable primes $x_1, x_2$. My question is how do we guarantee that $P$, the plaintext will be coprime to $N$? Thank you in advance!
I'd like forward secrecy in a case where the two sides have a shared long-term symmetric key. I intend to use AES in GCM. It looks like ephemeral Diffie-Hellman is the best way to generate the session keys. My question is, is it sufficient to just encrypt the key exchange using the long-term key, or should that be also...
There were fifteen candidates in the AES selection and I suppose that Rijndael wasn't the single good algorithm. I know that Camellia is an evolution of E2 candidate and can be used as symmetric cryptographic routines in TLS. Which others ex-candidates have today a "serious" implementation and a real usage ?
I have a short message that’s exactly 128 bits of length. The message serves as a time-limited authorization token for a database. It contains a permission profile ID (64 bits) and an issue timestamp (64 bit double). The key is known only to the issuing server, but the content may actually be given to the user in plain...
In polyalphabetic substitution cipher, if we have a key $k$ (a string of letters) of length $n$ does the plaintext $m$ (also a string of letters) have to satisfy $|m| \geq n$? Also, side question, do we have to include a requirement that at least one letter in the key is different from the others? Because otherwise it...
Is $\frac{1}{n!}$ a negligible function where $n$ is a security parameter? Application: I have a vector of n>100 elements. I permute it and give it to an adversary. The adversary can break it if it can find the original oder of vector. Its probability to succeed is: $\frac{1}{n!}$. Thus, I need to know whether this pro...
I want to encrypt data that is stored on the hard disk using a user-entered password. For this I look into the sodium docs and all I can find for symmetric encryption is authenticated encryption. This method requires a "nonce" which is needed again in decryption. If I understand correctly, nonces are important for comm...
I dont want to ask for help without showing how far I came by myself, so this is what I have so far: The file of interest is an encrypted/obfuscated .bin script, which cotains information on certain weaponstats eg. damage or accuracy. It is part of an older computergame. The raw file containts only hexvalues, which I "...
Suppose we have some one-way function $h$. Without further specification of $h$, how can we be sure that we can define another function $g(n) = h(h(n))$? That is, how do we know the range of $h$ is a subset of the domain of $h$? Relevance to Cryptography: One-way functions are minimal assumptions for the constructing p...
I've been looking around for a way to authenticate a client to the server and deliver a message, but in a unidirectional fashion - that is, the client sends messages to the server, but the server cannot send anything to the client. I want to both deliver the message and also convince the server that the client does ind...
Based on computational indistinguishability definition no PPT algorithm can distinguish $X$ from $Y$, where $X=\{X_n\}_{n \in N}$ and $Y=\{Y_n\}_{n \in N}$ are ensembles of probability distributions and $X_n$, $Y_n$ are probability distributions over $\{0,1\}^{p(n)}$ for some polynomial $p(.)$. The above defi...
Let $F : \{0,1\}^n \times \{0,1\}^n \rightarrow \{0,1\}^n $ be a PRF. And let the encryption function be $Enc{_k}(m) = r || (F{_k}(m) \bigoplus r \bigoplus 0^n)$ , where r's value is random. Is this system CCA secure? I am having trouble deciding this. Since r's length is m(otherwise I wouldn't be able to XOR it with $...
I've been searching around the web for best practice how-to on secure password reset system (email with reset url), and the idea to hash the token in the database, which I did not implement at first, seems to be the the most secure way to store the token. Im currently following this guide, and he does not mention it (w...
If we're considering Chosen-Plaintext Attack setting, then the adversary has access to the Encryption Oracle right, and we know that OTP is only considered secure if we use the key only once. How would we ensure that the adversary uses the key only once? Or would it not matter how the adversary uses the encryption orac...
The HMAC Construction is defined as: Hash( (Key XOR opad) || Hash((Key XOR ipad) || Message) ) This was designed because a simpler construction such as: Hash(Key || Message) Is vulnerable to a length extension attack (but not for all hashes, a notable exception is SHA-3). The questions are, what about cases where the...
How do I safely encrypt a file? or formulated differentely: How do I safely store the data of my application in a file? Note: Using established tools isn't an option for this. The tasks need to be done at program level (using libraries and such).
Let (S,V) be a secure MAC defined over $(K,M,T)$ where $M = \{0,1\}^n$ and $T =\{0,1\}^{128}$. Which of the following is a secure MAC: $S'(k,m) = S(k,m)[0,\ldots,126]\quad and \quad V'(k,m,t) = \big[V(k,\ m,\ t\big\|0) \ \text{ or }\ V(k,\ m,\ t\big\|1)\ \big] $ $S'(k,m) = S(k,m)\quad and \quad V'(k,m,t) = \big[V(k,\...
Let $H: M \to T\ $ be a collision resistant hash function. Which of the following is collision resistant: $ 1.H'(m) = H(m \big\| m)$ $2.H'(m) = H(m) \big\| H(0)$ $3.H'(m) = H(m) \oplus H(m)$ $4.H'(m) = H(H(m))$ $5.H'(m) = H(0)$ $6.H'(m) = H(|m|)$ $7.H'(m) = H(m)[0,\ldots,31] $ (i.e. output the first 32 bits of the ha...
Let F be a block cipher with 128-bit block length. Consider the following encryption scheme for 256-bit messages: to encrypt message $M=m_1∥m_2$ using key $k$ (where $|m_1|=|m_2|=128$), choose random 128-bit $r$ and compute the ciphertext $r∥F_k(r)\oplus m_1∥F_k(m_1)\oplus m_2$. Is there any strategy that leads to a va...
Is there something like a perfect asymmetric crypto-algo? Is there proof that there must be one or not. From a logical point of view it seems to be possible to design such algorithm if your keysize is high enough. And please a mathematical solution and not some quantum-cryptography. Thanks in advance
If we composed (as in function composition) multiple CPA-secure encryption schemes would the result also be CPA-secure?
Suppose we have an encryption scheme that fails the indistinguishability of encryptions test. That is, given messages $m_0, m_1$ and a ciphertext $c_b = Enc_k(m_b)$, where $b \in \{0, 1\}$, the distinguisher $D$ can extrapolate which message was encrypted. Here $D$ has the advantage of knowledge of what the messages ar...
I read some papers saying a certain scheme is secure for offline brute force attacks, but vulnerable to online brute force attacks. I wonder the difference between the online and offline brute force attacks.
The Wikipedia page for Montgomery curves shows how to convert points on a twisted Edwards curve to and from points on an equivalent Montgomery curve. However, their description and the original twisted Edwards curve paper use affine coordinates for the conversion. Is it possible to convert directly from projective twis...
Begin hashing (Key||Message) Encrypt the hash state (or some part of it, such as the first 128 or 256 bits), with the key. Add the encrypted hash state to the hash and return the result. This could be roughly described as Hash(Key||Message||Encrypt(Previous hash state)) There are several properties about this: It m...
I do not know much about cryptography. But, I'm in a situation where I need a hashing method that does not exhibit the avalanche effect. I tried Googling but couldn't find anything.
My idea was, given that a computer could produce some sort of lookup tables on paper, could then a human use those lookup tables to create a system for digital signatures? This was really an idea for fictional writing. I was trying to figure out whether it could be possible in a society at sort of 1950s technology to c...
Is there research on a hash function or a MAC that can be executed without computers? I know there's a lot of history on hand-based ciphers and the OTP can easily be excecuted by hand. (By using numbers / letters) But modern cryptography requires authentication as well as encryption. Now I'm asking myself, is there a (...
Any thoughts on how this can be done? Let $\Pi_1 = (\mathrm{Gen}_1, \mathrm{Enc}_1, \mathrm{Dec}_1)$ and $\Pi_2 = (\mathrm{Gen}_2, \mathrm{Enc}_2, \mathrm{Dec}_2)$ be two encryption schemes for which it is known that at least one is CPA-secure. The problem is that you don't know which one is CPA-secure and which on...
In ECDH protocol is possible, naturally, to use the same algorithm for calculate a secret key for both communication parties (Alice and Bob for example). It is possible to design also a same algorithm for the parties comunication in the RSA-DH protocol?
$Z=(N-XY)^2$ is a surface with absolute minima ($0s$) anywere $Y=N/X$. I know this question is naiive, but shouldn't it be possible to apply a lossy compression filter to this function which preserves values only at discrete boundaries and then search for absolute minima? If the answer is no, is there any online refere...
It is well-known that the Grover's algorithm reduces cryptographic strength of symmetric ciphers to a square-root - e.g. AES-256 becomes only 2128 strong. However, these statements are always made about the raw block ciphers. How about GCM-AES256, CCM-AES256 and the like? The MAC tag in GCM is at most 128 bits. Does th...
I asked this question recently but I was told it is not save to simply send over the identifier for your crypto method you want to use. for example, say the server has crypto method 3 5 and 6, the client had 2, 3, and 6. The clients sends the methods it can do and the server checks the highest possible version. A man i...
I have this problem: "Let ${\rm Enc}_k(m)$ a safe block encryption system. We define a hash function $H(m)$ as follows: $m$ will be concatenated with $0$ until $|m|$ is a multiple of len(block); we break the sequence $m$ into $n$ blocks like $m = m_0 \mathop\| m_1 \mathop\| m_2 \mathop\| \dots \mathop\| m_{n-1}$; we ...
I'm writing a coursework and right now I've implemented the ECDSA algorithm, but I also need to encrypt and decrypt small text files (.txt) using elliptic curve cryptography. The problem is that I do not know how to represent the message in the file.
I want to implement a secure chat via mobile. I´ld like to know if the following protocol for key agreement – which can use any asymmetric encryption – exists. Suppose Alice and Bob are two clients of the app. For this they have to register their public keys in a server: Alice generates her public and private keys (pu...
I'm aware that MD5 is broken, and collisions have been found for it. I'm interested in other hashes (SHA-1, SHA-2, SHA-3) when truncated to the same digest size, i.e. 128 bits. The time complexity of a collision attack is 2^(n/2) (the "birthday attack"). So in the case of a 128 bit hash, one would have to hash 2^64 inp...
I know that the industrial standard is normally sending data in the following format: Send Encr(msg, Sign(msg)) Is the following way a secure as well? Send Enc(msg) and Sig(msg) By secure, I mean no one will be able to read my message, and no one will be able to tamper my message.
Wikipedia claims: A secure block cipher can be converted into a CSPRNG by running it in counter mode. This is done by choosing a random key and encrypting a 0, then encrypting a 1, then encrypting a 2, etc. The counter can also be started at an arbitrary number other than zero. Obviously, the period will be 2^n for an...
I was looking at the serial numbers of the certificates for www.google.com and wordpress.com. Wordpress was listed by openssl as: 04:0B:D4:F8:25:88:C5 This serial is listed as the serial for both my specific wordpress.com domain and for www.wordpress.com. A google search using the serial number as a keyword shows on...
I have read that the RSA numeric signature works as the following: Generation of keys : $p,q,N,e,d$ Process of signing the message $m$ (which is BigInteger) : it uses the secret key $sk=(p,q,d)$ so that $s=m^d\bmod N$ where $N=p*q$. Why do we use the secret key to sign the message? How I can hash the message ? Process...
How can I compute homomorphic multiplication in ElGamal? That is: Given two ciphertexts $(R_1,c_1)$ and $(R_2,c_2)$ corresponding to plaintexts $m_1$ and $m_2$ under some public key; how can I compute a ciphertext $(R,c)$ that is an encryption of $m_1\cdot m_2$ under that same public key?
al-right, I need some examples of hard and long RSA keys cause i think i have found vulnerability in RSA. i need you to give me few hard Values of n (which is pxq) and i will tell you what p and q are(don't tell me p and q, just tell me n)
Bruce Schneier and Gregory Maxwell have both stated that they believe the constants chosen for NIST's P curves (i.e. P-256r) are cooked. DJB has put together a detailed list of red flags but, outside of the suspicious constant, everything else appears to be potential implementation issues. What kind of a speedup could ...
Could anyone, please, tell me history of birth of Blowfish algorithm? Specifically, what is substantiation of Blowfish key length to be in range from 32 till 448 bits? Why, for example, it wasn't 64-512 so it's minimal key could be 2 times shorter than AES and maximal key could be exactly 4 times taller than AES with 2...
I have client connecting a server over HTTPS to send and retrieve data. The client always connects through HTTPS The certificate is known to the client beforehand (hard coded into the software) The password is auto-generated, so not chosen by the client For authentication, is there any reason I should do anything mor...
Disclaimer: the algorithms I present here (and in other messages) are used as a hands-on way to learn about developing crypto algorithms, (and might also be of interest for other curious people), not for practical use (at least not after dozens of iterations and peer-review). I understand some people vote down not just...
Is it possible (and is there any research I can read) to have 2 key pairs for different ciphers, for example RSA 1024 and some yet to be released EC (or other asymmetric cipher) than uses 1024 bit keys, that have the same public key?
i have some experience with cryptography in the banking sectors, mostly in block ciphers like DES 3DES etc. im interested in prepaid electricity meters as it is a number that is generated from a central system which is disconnected from the meter its self. This would mean they are using a symmetric algorithm using the...
I know that Huffman is not a encryption method, but I have a bit-stream that I know it's Huffman coded. However, the tree/table that maps the codes to real characters is not available. Surprisingly, during my searches I couldn't find helpful sources or even academic papers on this problem. It seems this problem has no ...
My problem is the following: we have a low entropy data called ID. (personal id number of 10 decimal digits plus a sum, and it contains a date) We want to create a data (H) which is the same for the same id, but id can neither be computed nor brute-forced by trying all combinations. It should be proven that even we are...
I am looking for an application (Windows) or code example that might help me find patterns in an encrypted file. I have a ciphertext for which I want to see when a key is repeated. I am not trying to break the encryption - just test for when a pattern repeats if it does so. I've searched, but haven't found anything y...
So if I use secp256k1 for example, I've got my key size of 256 bit, and say I sign a SHA256 hash of a message, with size 256 bit, I get an output of size 512bit. Why is there a difference between the hash size and the EC size. In other words, why isn't SHA512 used instead to provide bigger entropy? I'm not too familiar...
I have read the recent logjam paper Imperfect Forward Secrecy: How Diffie-Hellman Fails in Practice. On page 11 in the Recommendations section, they state: Avoid fixed-prime groups In the medium term, employing negotiated Diffie-Hellman groups can help mitigate some of the damage caused by NFS-style precomputation...
Just want to be sure about something before I sign off on a method we're about to put into place. We have a secret, to which a user-defined key is appended. The user can see the SHA256 hash of the secret. The secret and the user-key is then hashed with SHA512 to obtain results. Given the ending hash is SHA512, and the ...
In most (all?) classical sources such as the book of Goldreich (2001), hard-core predicated are defined thus: A polynomial-time computable predicate $b : \{0,1\}^* \to \{0,1\}$ is a hard-core of a function $f$ if for every probabilistic polynomial-time (PPT) algorithm $A$, every positive polynomial $p$ and all suffici...
In El-Gamal Algorithm, the public key is $(p, g, A)$, and the secret key is $(a)$, in order to encrypt some data, the sender generate a random $k$, where: $(C_1, C_2) = (m.A^{k} \pmod{p}, g^{k} \pmod{p})$ If a hacker know the value of $k$, should this break the algorithm security ?
Consider a number $r$ obtained by: $r=a \cdot b \mod n$ Can knowing the factorization of $r$ reveal some information (bits) of $a$ and $b$ ?
I have only the barest understanding of cryptography, but I've been following the Logjam issue; some posts and articles (elsewhere) imply that a client can regenerate DH keys. Is Logjam solely a server issue? Is there a way for the client to perform DH regeneration on a regular basis; if so, how? Is there any way the c...
I think we're all aware of the Logjam attack. From now on we know that re-using primes for DH is a bad idea. But we also say that elliptic curves are safe from the attack (relying on the NFS), because it cannot be applied. I understand this. Now in my mind this question arose: Assuming we had enough computational power...
Let P be a secure block cipher, eg AES-128. Let's say a server has a CBC encryption oracle which uses an attacker-selected yet unique nonce to generate the IV for each message = P(key, nonce). The same key is used to generate the IV from the nonce as to encrypt the message. This system is not semantically secure agains...
from reading the TLS 1.1 RFC, it looks like it would be possible to break a previously recorded TLS <1.2, 512-bit DHE ServerKeyExchange and then send it (unmodified, with the original, valid signature) to a client that still accepts TLS <1.2 and 512-bit DHE to impersonate a server that has since been fixed (disabling D...