instruction
stringlengths
15
30k
If I wanted to use one of those algorithms to provide security on a device where power consumption is crucial, which one would win? Generally, which algorithms are known to consume the least energy and why? Which parameters should be considered the most? How much research is done regarding power consumption of crypt...
I am working on attacks on RSA and came across the M. Weiner attack. The limit for $d$ in order for the attack to apply is $d <= (\frac{1}{3})N^{0.25}$. The paper states that Boneh and Durfee improved this limit… but to what? What's the limit they reach for the attack to still apply?
If I wanted to use Blowfish or Twofish to provide security on a device where power consumption is crucial. Regarding power consumption, which one would win? Generally, which algorithms are known to consume the least energy and why? Which parameters should be considered the most? How much research is done regarding p...
In RSA encryption time is usually much less than decryption time due to having a small public exponent. Can this be achieved in Elliptic Curve Crypto (ECC)?
In RSA, encryption time is usually much less than decryption time due to having a small public exponent. Can this be achieved in Elliptic Curve Crypto (ECC)?
I was going through a paper titled [“Accelerating Pollard's Rho Algorithm on Finite Fields”](http://www.researchgate.net/publication/220479079_Accelerating_Pollard%27s_Rho_Algorithm_on_Finite_Fields) by Jung Hee Cheon et al. I understand the table(Ml) creation part of it, but after that I somehow fail to follow the res...
Can anyone explain how the modified r-adding walk works?
We know that [Cryptographic hash function](http://en.wikipedia.org/wiki/Cryptographic_hash_function) is generally a one-way function where we can't retrieve the original message. On the other hand, encryption is a two-way-function where we get the original message from the encrypted message or vice versa. So, in a norm...
I've been wondering about the 'small' part of the attacks on RSA, like the small public key exponent and the small private key exponent and what's not really clear is how small are we talking about? Like is it how small with respect to the large prime numbers or what exactly?
I'm a big fan of Colin Percival's "Cryptographic Right Answers" post (http://www.daemonology.net/blog/2009-06-11-cryptographic-right-answers.html). This was written in 2009, which is a long time ago in Internet years. Is the advice still valid or, if not, can someone point me to more up-to-date information?
Let $i, j \in GF(2^q)$ and $i \neq j$ and $i,j\neq0$. Is that possible that $i^n=j^n$ for some $n$ such that $0 < n < 2^q-1$? I am looking for a proof if the answer is *no*, or for a method to find $n$ if the answer is *yes*.
I`m wondering if we can add some unknowns to a system polynomials to make it hard to solve it? I have the following systems: F1(x1)=s+a1x1 F2(x1)=s'+a2x1 F3(x1)=s'+a3x1 F1(x2)=s+a1x2 F2(x2)=s'+a2x2 F3(x2)=s'+a3x2 F4(x1)=s'+a4x1 ...
I`m wondering if we can add some unknowns to a system polynomials to make it hard to solve it? I have the following systems: F1(x1)=s+a1x1 , F1(x2)=s+a1x2 ,F2(x1)=s'+a2x1 , F2(x2)=s'+a2x2 ,F3(x1)=s'+a3x1 , F3(x2)=s'+a3x2 ,F4(x1)=s'+a4x1 ...
I can understand the the basic Hill Cipher is susceptible to known plaintext attacks. But suppose the Hill Cipher is modified into the Iterated Hill Cipher. For a plaintext $x_0=m_0$ and an initialization vector $x_{-1}=u_0$ we have, $$x_{i+1}=Ax_{i}-x_{i-1}$$ for $0\leq i< k$. So our public key consist of the tr...
I`m wondering if we can add some unknowns to a system polynomials to make it hard to solve it? I have the following systems: F1(x1)=s+a1x1 , F1(x2)=s+a1x2 ,F2(x1)=s'+a2x1 , F2(x2)=s'+a2x2 ,F3(x1)=s'+a3x1 , F3(x2)=s'+a3x2 ,F4(x1)=s'+a4x1 ...
I'm wondering if we can add some unknowns to a system polynomials to make it hard to solve it? I have the following systems: F1(x1)=s+a1x1,F2(x1)=s′+a2x1,F3(x1)=s′+a3x1,F4(x1)=s′+a4x1,F1(x2)=s+a1x2,F2(x2)=s′+a2x2,F3(x2)=s′+a3x2,F4(x2)=s′+a4x2 Unkowns:a1,x1,x2,a2,a3,a4,s,s′ If we have the vectors A⃗ =[F1(x1),F2(x1)...
I'm a big fan of [Colin Percival's "Cryptographic Right Answers"](http://www.daemonology.net/blog/2009-06-11-cryptographic-right-answers.html) post. This was written in 2009, which is a long time ago in Internet years. Is the advice still valid or, if not, can someone point me to more up-to-date information?
I am working on Efficient Construction of Pairings which are being realized by Miller's algorithm. In this algorithm the basic steps are 1. point doubling and line function computation 2. point addition and line function computation, and last one is 3. exponentiation. I know Point doubling and point additio...
I'm wondering if we can add some unknowns to a system polynomials to make it hard to solve it? I have the following systems: $F_1(x_1)=\\ s+a_1x_1,F_2(x_1)=\\ s′+a_2x_1,F_3(x_1)=\\ s′+a_3x_1,F_4(x_1)=\\ s′+a_4x_1,F_1(x_2)=\\ s+a_1x_2,F_2(x_2)=\\ s′+a_2x_2,F_3(x_2)=\\ s′+a_3x_2,F_4(x_2)=\\ s′+a_4x_2$ U...
I want to implement some of the basic encryption algorithms on smart card, could any body guide me how to program a smart card, which tools (hardware and software) I should have, and if these tools are free? Also, is it possible to implement Bi-linear pairing on smart cards or ECC algorithms?
I can understand that the basic Hill Cipher is susceptible to known plaintext attacks, but suppose the Hill Cipher is modified into the Iterated Hill Cipher. For a plaintext $x_0=m_0$ and an initialization vector $x_{-1}=u_0$ we have, $$x_{i+1}=Ax_{i}-x_{i-1}$$ for $0\leq i< k$. So our public key consist of the t...
I know that vigenère can broken using autcorrelation (as explained in http://www.cryptool-online.org/index.php?option=com_content&view=article&id=90&Itemid=107&lang=en ). Now my question is: Why does this also work with autokey (tested it using crypttool)? To prove that I have already put work into this, I have read...
I'm wondering if we can add some unknowns to a system polynomials to make it hard to solve it? I have the following systems: $$F_1(x_1)=s+a_1x_1\\ F_2(x_1)=s′+a_2x_1\\ F_3(x_1)=s′+a_3x_1\\ F_4(x_1)=s′+a_4x_1\\ F_1(x_2)=s+a_1x_2\\ F_2(x_2)=s′+a_2x_2\\ F_3(x_2)=s′+a_3x_2\\ F_4(x_2)=s′+a_4x_2$$ Unknowns...
I know that Vigenère can broken using auto-correlation ([as explained at cryptool-online.org](http://www.cryptool-online.org/index.php?option=com_content&view=article&id=90&Itemid=107&lang=en)). Now my question is: Why does this also work with autokey (tested it using crypttool)? To prove that I have already put wor...
I'm trying to come up with a new way to do [oblivious transfer](http://en.wikipedia.org/wiki/Oblivious_transfer) that is faster and requires less computation than existing methods. The basis of my method is shamir secret sharing. Below is an example of how the system would work. Let $C$ be a matrix. The user would l...
I'm trying to come up with a new way to do [oblivious transfer](http://en.wikipedia.org/wiki/Oblivious_transfer) that is faster and requires less computation than existing methods. The basis of my method is shamir secret sharing. Below is an example of how the system would work. Let $C$ be a matrix. The user would l...
I'm trying to use a [java implementation of ed25519][1]. In the code, I can't find any functions that generate keys. My experience with cryptography is limited to about three weeks of asking questions on stack. Does the code generate keys? If so, which function? [1]: https://github.com/k3d3/ed25519-jav...
I have a question about linear block erasure codes that are described in [this paper][1]. I briefly describe the idea behind the linear erasure codes and then I ask my question. Given a set $d=\langle x_i \in GF(2^q)|i=1,\cdots,k\rangle$ of data packets, the general idea of (systematic) erasure codes is to generate...
I'm learning about the proof of the RSA encryption algorithm, and I'm clearly fudging or missing something, because for me it doesn't add up. When generating keys for RSA encryption, we make sure that: $ed = 1\ (mod\ phi(n))$ But when encrypting or decrypting, we use: $C = M^e \ (mod\ n)$ Now I would...
I’ve spent a couple of days researching the topic of creating a license system for my desktop software. While I fully understand that there’s no perfect copy protection, this approach seems to have the best balance for me. There are a couple of details that I can’t fully get my head around before starting with the imp...
First off: if you sign the licensing information server-side what keeps hundreds of users from using the same license? I´d rather create asymmetric key pairs and provide the private key along with an ID as the license code. The client can then proove to the server that it owns a valid license. This already ansewers que...
I'm learning about the proof of the RSA encryption algorithm, and I'm clearly fudging or missing something, because for me it doesn't add up. When generating keys for RSA encryption, we make sure that: $ed \equiv 1\pmod{\varphi(n)}$ But when encrypting or decrypting, we use: $C \equiv M^e \pmod{n}$ Now...
You are misunderstanding Fermat's Little Theorem (or rather, its more general form as Euler's Theorem) which does *not* state that a multiplicative inverse modulo $\varphi(n)$ is the same modulo $n$. What the theorem says is that if you have an integer $a$ coprime* to $n$, then the following is true: $$a^{\varphi(n)...
In some literature im reading, where they are explaining the permutation cipher, they have two examples, which encrypt a small block of text. But they seem to contradict each other: First example: permutation: ${1\text{ }2\text{ }3 \choose 3\text{ }1\text{ }2}$, plaintext: VEN, ciphertext = NVE Second example: p...
Correct way to read a given permuation cipher?
Are they any reductionist proofs where an attacker $\mathcal{I}$ for a well established computationally "hard" problem $\mathsf{Π}$ is employing an attacker $\mathcal{A}$ who we assume is able to break a decisional problem $\mathsf{Γ}$ (i.e: semantic security->guess if $b=1$ or $b=0$) in order $\mathcal{I}$ to break $\...
Are they any reductionist proofs where an attacker $\mathcal{I}$ for a well established computationally "hard" problem $\mathsf{Π}$ is employing an attacker $\mathcal{A}$ who we assume is able to break a decisional problem $\mathsf{Γ}$ (i.e: semantic security->guess if $b=1$ or $b=0$) in order $\mathcal{I}$ to break $\...
i wondered what the security implications are if i do the following. If i had a large file encrypted with a OTP and want to change only a few bytes in the plaintext. what security vulnerabilitys do i get if i only generate o new OTP for the changing bytes leave the old OTP as is and substitute the new OTP, and do this ...
i wondered what the security implications are if i do the following. If i had a large file encrypted with a OTP and want to change only a few bytes in the plaintext. what security vulnerabilitys do i get if i only generate a new OTP for the changing bytes leave the old OTP as is and substitute the new OTP, and do this ...
I'm wondering why hash constructions aren't parallel like CTR mode for encryption? For example: We have ideal block cipher E, where we encrypt message block with counter and xor output block with message block. Then we xor (sum) all blocks and encrypt it with length of message and xor with sum of all blocks to get h...
I can understand that the basic Hill Cipher is susceptible to known plaintext attacks, but suppose the Hill Cipher is modified into the Iterated Hill Cipher. For a plaintext $x_0=m_0$ and an initialization vector $x_{-1}=u_0$ we have, $$x_{i+1}=Ax_{i}-x_{i-1}$$ for $0\leq i< k$. So our private key consist of the ...
I'm wondering why hash constructions aren't parallel like CTR mode for encryption? For example: We have ideal block cipher E, where we encrypt message block with counter and xor output block with message block. Then we xor (sum) all blocks and encrypt it with length of message and xor with sum of all blocks to get h...
I’ve spent a couple of days researching the topic of creating a license system for my desktop software. While I fully understand that there’s no perfect copy protection, this approach seems to have the best balance for me. There are a couple of details that I can’t fully get my head around before starting with the imp...
I have more bits than the degree of the NTRU polynomial (for example x^11-1, message: Hello- i am using ascii, 8 bits for 1 symbol), got:0100100001100101011011000110110001101111. How i should split up meassage into blocks? Pls answer with example.
How to make a message into a blocks NTRU?
I have more bits than the degree of the NTRU polynomial (for example x^11-1, message: Hello- i am using ascii, 8 bits for 1 symbol), got:0100100001100101011011000110110001101111. <br> How should I split up meassage into blocks? Please answer with example.
How can I make a message into a blocks for NTRU?
> Why? We want to be able to build off of more basic encryption schemes. > Suppose we use some stream cipher; then why can't we use Encrypt(m|H(m)) as the MAC-then-encrypted version of the message? For "traditional" non-authenticated encryption schemes, encrypting plaintexts with the same length always produce...
It seems that even in MAC-then-encrypt systems like SSL, something like HMAC is used rather than a plain hash. Why? Suppose we use some stream cipher; then why can't we use $Encrypt(m | H(m))$ as the MAC-then-encrypted version of the message? Assuming no bad relations between $Encrypt$ and $H$, what are the possibl...
Sign the license text. There's nothing confidential in the license text, so you don't need confidentiality. If possible, include some kind of customer ID or something in the license that links it to a particular customer. Standard digital signature schemes can easily sign arbitrary-length messages. Don't worry ...
Sign the license text. There's nothing confidential in the license text, so you don't need confidentiality. If possible, include some kind of customer ID or something in the license that links it to a particular customer. Standard digital signature schemes can easily sign arbitrary-length messages. Don't worry ...
Updated answer -------------- The question was changed, so here is my updated answer. This scheme is not secure against known-plaintext attacks. It is no better than an ordinary Hill cipher. If you iterate the recurrence relation you listed, we find that $$x_k = Bx_0 - Cx_{-1}$$ and $$x_{k-1} = Cx_0...
I have more bits than the degree of the NTRU polynomial. For example: $x^11-1$ message: `Hello` (I am using ascii, 8 bits for 1 symbol) got: `0100100001100101011011000110110001101111`. How should I split up message into blocks? Please answer with example.
i wondered what the security implications are if I do the following. If I had a large file encrypted with a OTP and want to change only a few bytes in the plaintext. what security vulnerabilities do I get if I only generate a new OTP for the changing bytes leave the old OTP as is and substitute the new OTP, and do this...
In some literature I am reading – where they are explaining the permutation cipher – they have two examples, which encrypt a small block of text. But they seem to contradict each other: First example: > permutation: ${1\text{ }2\text{ }3 \choose 3\text{ }1\text{ }2}$, plaintext: `VEN`, ciphertext =` NVE` Sec...
From what I have read it seems like one of the purported benefits of using CTR mode AES, is that it can be parallelized to a greater degree, or maybe more easily than the other block cipher modes, leading to performance gains? In [NIST SP800-38A](http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf) §6.5...
I'd like to encrypt the contents of a log file that my application writes. The log system has the following characteristics: * The file format is binary. * Log files are left open while the application is still running. * New data is appended as a log entry is made. * Log entries have varying lengths, I cannot al...
I have recently learned that Encrypt-then-MAC is recommended when using symmetric encryption. I have two closely related questions related to that, which is why I am posting them as one: 1. Looking at the different kinds of available MACs (UMAC, HMAC, etc.), does it matter which one I use? Meaning: does the choi...
Let us say Alice publishes a book under the name of Claire. The book becomes wildly popular and now Bob comes along, claiming to be Claire, to reap all the success. How does Alice prove that she wrote the book (and Bob did not) as Claire without revealing that she is Alice? More specifically: what information can she i...
Example: http://jsfiddle.net/KGtUE/ https://code.google.com/p/crypto-js/#Progressive_Hashing sha256.update("abc"); sha256.update("def"); sha256.update("ghi"); vs CryptoJS.SHA256("abcdefghi"); How does this work?
How Does Progressive Hashing Work?
From what I have read it seems like one of the purported benefits of using CTR mode AES, is that it can be parallelized to a greater degree, or maybe more easily than the other block cipher modes, leading to performance gains? In [NIST SP800-38A](http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf) §6.5...
I have more bits than the degree of the NTRU polynomial. For example: $x^{11}-1$ message: `Hello` (I am using ascii, 8 bits for 1 symbol) got: `0100100001100101011011000110110001101111`. How should I split up message into blocks? Please answer with example.
Correct way to read a given permutation cipher?
Related: http://crypto.stackexchange.com/questions/10467/what-is-the-lowest-level-of-mathematics-required-in-order-to-understand-how-encr and http://crypto.stackexchange.com/questions/8443/recommended-skills-for-a-job-in-cryptology In the context of putting crypto into applications, in a secure manner, could it be a...
Is it a requirement to understand mathematics when implementing cryptography?
I have implemented a ECC key generation scheme successfully. Now I need to find ECC key sizes of each generating key pairs. I assumed that ECC key size is the size of the ECC private Key. So I would like to to know whether it is correct?
__Is it good or bad practice to design crypto protocols for key compromise by using additional keys?__ Argument for bad practice would be: When you have a key you should trust it and not throw more keys at the protocol "just in case". Is there any research/substance to that argument? Eventually, does it all boil down t...
Use additional keys to thwart key compromise?
Are precomputation attacks - such as outlined in [RFC 3610 chapter 5](http://tools.ietf.org/html/rfc3610) - possible on [RSA PKCS#1 v1.5 signature generation](http://tools.ietf.org/html/rfc3447#page-32)? If yes, are such attacks taken into account when calculating the cryptographic key strength of RSA? Do they have the...
No, these sorts of attacks are not of any use against RSA -- they are *much* harder to perform than other existing attacks (and in particular, attacks that factor an RSA modulus). Here is how this precomputation attack works; you assume that someone generating the keys will always MAC (or sign) a specific message: ...
I'd like to encrypt the contents of a log file that my application writes. The log system has the following characteristics: * The file format is binary. * Log files are left open while the application is still running. * New data is appended as a log entry is made. * Log entries have varying lengths, I cannot al...
I'm new to programming and I'm getting ready to design a proof of concept for an app that' I'm thinking of building. Problem is I'm a complete noob to cryptography and need a little nudge to point me in the right direction. I would like to design a method by which data sent to my application on a cloud server is pr...
How to process data within cloud securely?
I'm new to programming and I'm getting ready to design a proof of concept for an app that I'm thinking of building. Problem is I'm a complete noob to cryptography and need a little nudge to point me in the right direction. I would like to design a method by which data sent to my application on a cloud server is pro...
How can I process data within a cloud securely?
If you consider a 26 letter alphabet, and a cipher where 24 of the letters are sent to themselves, and only 2 letters switch, how many different substitution alphabet ciphers are there, and what percentage are they of total possible? I thought it would be there are $26\cdot25=650$ such possible ciphers, for a percen...
Number of different substitution alphabet ciphers possible with given conditions?
In Sweden in the late 90's they deplyod a electronic pre-paid cash system system, and if i remember correctly you could transfer money between cards without online access. Wikipedia states that the dis-continued systems TransCash, 247card and iKobo had the same function On usage would be 1. You load up your card a...
You're on a middle path here, and the main question is: What do you want to hide? What can the attacker see before/after the change? The least secure one is: Just XOR the bit changes on the ciphertext and be done with it. The information theoretic property still holds: If the attacker has exactly $0.5$ chance of gue...
You're on a middle path here, and the main question is: What do you want to hide? What can the attacker see before/after the change? The least secure one is: Just XOR the bit changes on the ciphertext and be done with it. The information theoretic property still holds: If the attacker has exactly $0.5$ chance of gue...
Related: http://crypto.stackexchange.com/questions/10467/what-is-the-lowest-level-of-mathematics-required-in-order-to-understand-how-encr and http://crypto.stackexchange.com/questions/8443/recommended-skills-for-a-job-in-cryptology In the context of putting crypto into applications, in a secure manner, could it be a...
In Sweden in the late 90's they deployed a electronic prepaid cash system system, and if I remember correctly you could transfer money between cards without online access. Wikipedia states that the dis-continued systems TransCash, 247card and iKobo had the same function. On usage would be 1. You load up your car...
Is it a requirement to understand mathematics when implementing (or breaking) cryptography?
I'm learning the POK notion and definitions and as a self exercise I wante to prove the statement that the Hamiltonicity protocol is a POK system with knowledge error $1/2$. So the question will be self-contained, I provide here the slide describing the protocol (credits to Moni Naor, Weizmann institute). ![enter i...
I'm learning the POK notion and definitions and as a self exercise I wante to prove the statement that the Hamiltonicity protocol is a POK system with knowledge error $1/2$. So the question will be self-contained, I provide here the slide describing the protocol (credits to Moni Naor, Weizmann institute). ![enter i...
I've come to understand that twisted curves, as for instance defined in the Brainpool specifications, are isomorphic to their regular $F(p)$ equivalents. So brainpoolP256r1 is isomorphic to brainpoolP256t1. In a protocol, does it make sense to specify support for twisted curves? Should it be possible to specify the ...
Sure the dealer can do that. The real question is, what kind of security does it provide? If the attacker can verify when he has found the right $x$ values, then at **best** the security of the scheme is computational in the size of the underlying finite field. If the attacker cannot verify when he has found the right ...
I've come to understand that twisted curves, as for instance defined in the [Brainpool specifications](http://tools.ietf.org/html/rfc5639), are $F(p)$-isomorphic to their regular $F(p)$ equivalents. So brainpoolP256r1 is isomorphic to brainpoolP256t1. In a protocol, does it make sense to specify support for twisted ...
Sure the dealer can do that. The real question is, what kind of security does it provide? If the attacker can verify when he has found the right $x$ values, then at **best** the security of the scheme is computational in the size of the underlying finite field. If the attacker cannot verify when he has found the right ...
<p> Crypto Stack Exchange is for software developers, mathematicians and others interested in cryptography. </p> <p>Cryptography Stack Exchange is for asking questions about the mathematics and properties of cryptographic systems, their analysis ("cryptanalysis") and subsidiary topics that generally make up crypto...
1. $A \to B$: Alice, $nonce_A$ 2. $B \to A$: $nonce_B$, $E_{k_{AB}}(nonce_A \| k_1)$ 3. $A \to B$: $E_{k_{AB}}(nonce_B \| k_2)$ Alice and Bob both compute $k_s$ = $k_1$ xor $k_2$ 4. $A \to B$: $E_{k_s}(...)$ 5. $B \to A$: $E_{k_s}(...)$ The protocol is based on a long term secret $k_{AB}$ shared between Ali...
This is an exam question: 1. $A \to B$: Alice, $nonce_A$ 2. $B \to A$: $nonce_B$, $E_{k_{AB}}(nonce_A \| k_1)$ 3. $A \to B$: $E_{k_{AB}}(nonce_B \| k_2)$ Alice and Bob both compute $k_s$ = $k_1$ xor $k_2$ 4. $A \to B$: $E_{k_s}(...)$ 5. $B \to A$: $E_{k_s}(...)$ The protocol is based on a long term secre...
This is an exam question in Computer Security course: Here is the start of a protocol, based on a long-term secret key $k_{AB}$ previously shared between Alice and Bob, designed to offer bilateral authentication and establishment of a session key $k_s$. The session, which begins at message 4, is supposed to be con...
As I understand it, CTS pads the last block and swaps it with the second last to compensate for a partial block of data.. I have written a DRBG using AES-CBC that only accepts an input size that falls on the block boundary.. so my question is.. is CTS really necessary here? I can't imagine a way in which it's absence w...
Is CTS necessary on a AES-CBC DRBG?
Actually, those two algorithms are surprisingly close; I'll write both of them up to show how close they are. They both can be written as a combination of three substeps: A := Add( B, C ) This takes the two points B and C, and adds them together (I'll be writing things in additive notation; in RSA, with wo...
Actually, those two algorithms are surprisingly close; I'll write both of them up to show how close they are. They both can be written as a combination of three substeps: A := Add( B, C ) This takes the two points B and C, and adds them together (I'll be writing things in additive notation; in RSA, with wo...
If someone finds an efficient way (ridiculous or not) to turn NP into P (such as creating multiple universes, saving the one with the correct answer), would we have any good algorithms for encryption, hashing and so on that are still secure? What other algorithms would become way more efficient? Constant-time sorting? ...
I decided to learn more about the application of formal methods to cryptographic protocols and found this interesting talk by Cathy Meadows: http://www.youtube.com/watch?v=gKAzitEv2ho After doing research about how people are using formal methods it seems to me that they're NOT being used for design. In other wor...