instruction
stringlengths
32
27.2k
As I understand it, NORX gets 3.5 CPB in an unoptimized implementation. But NORX can be parallelized. With 4-way SIMD, I would expect about 7/8 CPB performance. This is nearly as good as AES-GCM in hardware. Is something wrong with my assesment, or is parallel NORX a better choice in speed than ChaCha20-Poly1305? Wh...
The HS1-SIV authors claim that forgeries are possible if an SIV collision occurs. However, I do not understand how this is possible unless the PMN collides too. Otherwise, the collision will be in the output of a PRF and will not be useful to the attacker unless the SIV is being used as an index or the like.
Suppose I encrypt a bytestream using ChaCha20, and then encrypt the resulting ciphertext using AES in ECB mode. How secure is the combination?
I have some files that are encrypted using an unknown key and it's using the CBC method to encrypt the files. When I XOR two files together the first two bytes are always the same, but different for each files (make sense for each file) From that is it possible to recover the real key? First bytes of the file : 1a 1a ...
The parameters of the Fully Homomorphic Encryption scheme by Dijk et.al are chosen according to the value of the security parameter ${\lambda}$, section 3 of the aforementioned article. What is the security parameter for this scheme ? It represents the bits of security the scheme has ? If so, what would be a secure va...
I have read that the degree of freedom is calculated by subtracting 1 from the number of states a random variable can be in. I am performing a goodness of fit test on a 64*32 strict avalanche criterion matrix where the expected frequency of any a[i,j] is 50000 and the observed frequency can lie between [0,100000].What ...
Besides the Niederreiter cryptosystem, are there any other variants that support digital signatures? Can any of them sign arbitrary signatures unlike the Niederreiter cryptosystem? What are the key and signature sizes?
I want to implement authenticated encryption using C#. There is a dot net class called encryptAndAuthenticate, but it is only supported on windows 8 or later, and I need the code to also work on windows 7. In other words, there is no built-in dot net library to do AES in GMC mode that works on windows 7 or earlier. S...
As I understand it the proof that RSA-OAEP is secure in the random oracle model is much tighter for exponent 3. Does that mean that exponent 3 should be chosen?
PIR protocols retrieve an item from the database without the server knowing which item it is. But classic CPIR(Computational PIR) or IT-PIR (Information Theoretic PIR) protocols requires the user to know the location address of the object to be retrieved. Major work on retrieving by Keywords is done here and subsequent...
There exist processors (for example ARM v8/v9 archicteture based), which cannot do AES-256 hardware based, but are equipped with AES-128 encryption hardware units. Is it possible to utilize an AES-128 encryption hardware unit in some way to speed up the calculation of AES-256?
I will need to distribute a file to people for a challenge and I need them to open the file at the same time. The file will be provided a couple of days before the challenge. For maximum compatibility (so no need for 3rd party software, just OS supplied tools) I was thinking of using a password protected Zip 2.0 file. ...
I am looking for practical lattice-based signatures and key exchange with strong security reductions. Specifically: Provable security under the relevant standard assumptions. Fast in software while resistant to timing attacks At least 128 bits of security
TLS 1.2 defines a PRF-like construction $P_{hash} : \{0,1\}^* \times \{0,1\}^* \rightarrow \{0,1\}^l$ for key derivation, etc. To quote the spec: We define a data expansion function, P_hash(secret, data), that uses a single hash function to expand a secret and seed into an arbitrary quantity of output: P_hash(secr...
How much space is actually needed to store a $4096$-bit RSA private key? I originally assumed $0.512$ kB since $\frac{4096}{8} = 512$, but then I started to wonder whether it was in hex. Simply, what's the size of a $4096$-bit private key, and how does it compare to the public key?
I have been trying to understand the interplay between robustness and privacy of an SMC protocol. It is easy to come up with a protocol that is private but not robust. Can someone provide an example of a secure multiparty computation protocol that is not private but is robust, under some threshold $t$ corrupt parties?...
If I have the SHA-256 sum of a 256-bit AES key, can I determine the key any faster than if I merely had a ciphertext and the corresponding plaintext?
Is there any point in making block size less than key size in block cipher? For example, Russian GOST symmetric cipher uses 256-bit keys to encrypt 64-bit blocks. That means there are many keys which give the same result, so why making keys so large?
Is cryptography so specialized that taking a survey class is a waste of time? I'm not the type of person who can do logs in my head or has a deep mathematical aptitude, but cryptography is certainly very interesting. But I wonder if I'll scratch the surface and realize quite quickly that there are very few who can part...
First of all, I apologize in advance if I use any incorrect terminology. I am just getting my feet wet when it comes to cryptography and there is a lot to learn. For the past 12 months, we have been developing an application infrastructure for a Cloud and Mobile Application (iOS/Android). As part of the infrastructure,...
Background What is Ajtai's hash function? Given a matrix $A \hookleftarrow U(\mathbb{Z}_q^{n \times m})$ and a column vector $\vec{m} \in \mathbb{Z}_d^m$, the hash of the message $\vec{m}$ is given by $H(\vec{m}) = A\vec{m} \mod q$ Ajtai's SIS-lattice The corresponding lattice for $A$ denoted by $L^{\bot}(A)$ is define...
First of all let me point out that I am aware of all the theory behind asymmetric encryption and signing, and other related areas like signcryption, etc. It seems that mathematically it is possible to do what title suggests, however there is not a single working example of how to do it in practice, if possible at all. ...
Can anyone suggest how I'd generate cryptographic quality 1/f noise: aka 'pink noise', where the PSD follows 1/f. I'd be happy to derive the pink noise from white noise (e.g. /dev/urandom), but I don't want to filter it in a way that would compromise the quality of the noise. All the references to 1/f noise I can find...
Is there a difference between having 10,000 of chains (with 1,000 chain length) and 10,000 chain length (with 1,000 of chains)? How does it affect the success rate of the rainbow table? I understand that only start point and end point are kept in the table. The more chains you have, the disk space increases. Whereas th...
Microsoft Research published an approach to Quantum-safe TLS here, namely RLWE-ECDSA-AES128-GCM-SHA256. One highlight is that when it's used with ECC, there is only a slight performance hit. Assuming this becomes a popular way to have quantum-safe TLS, how important is it that manufacturers optimize for this?... in ot...
Recently, I'm reading one paper of Boneh and Zhandry. They have mentioned a pseudo random number generator that takes input a $n$-bit string and gives a $2n$-bit string as output. They just used it as a generic construction. I want to learn specific construction of such kind of PRNG. Please refer me any link or please ...
So here is the problem, my brother forgot about the eight digit numeric part of his password, he is using Ubuntu 15.04 default whole disk encryption To make it clear, this was his password (example) thiswashispassword12345678 He completely forgot about the 12345678 part, to make things worse it was his working laptop...
I have seen drives that boast that they use AES with CBC mode, which doesn't really make sense in my opinion, sure it's more secure than ECB (but actually, leaving security aside, ECB is better suited for disk encryption than CBC, explaining later) The Problem with CBC is that you have a serious chicken and egg problem...
As per the Schnorr's original paper (1991), The Security Complexity $2^t$: We wish to choose the parameters $p$, $q$ so that forging a signature or an authentication requires about $2^t$ steps by known methods. For this we choose $q > 2^{2t}$ and $p$ such that $2^t$ is about $e^{\sqrt{\ln(p)\ln(\ln(p))}}$. ... For $p...
Suppose there is a cryptographic hash function $H : \{0,1\}^* \to \mathbb G$. Now, we want to define a hash function $H' : \{0,1\}^* \to \mathbb G \times \mathbb G $. My first idea is to define $H'$ in the following way: $H'(x) = (H(x||'0'), H(x||'1'))$ Is $H'$ cryptographically secure? If not, can you propose a secur...
Say I want to perform a hash length extension attack. All the tools I have used use \x00 and \x80 to pad hashes (hlextend and hashpump). But is it necessary to use these bytes? Based on my understanding of padding (and this question: Computing the padding of MD5), it seems that I can use any byte I want. If so, how wou...
I understand what is happening and how the endpoint is computed but I'm still a bit unsure of where "SP" (Staring Point) came from. Are the starting points, randomly selected keys from the key-space n? for example...
HMACs depend on preimage resistance, or so I have read. The security strength of hash function with an $n$-bit output against collision attacks is $2^{\frac{n}{2}}$. Against preimage attacks, it is $2^{n}$. What is the security strength of an $n$-bit HMAC?
In the book An Introduction to Mathematical Cryptography, it mentions a section on digital signatures and a theoretical example. I am having difficulty understanding the book and I was wondering if someone could better explain how you would be able to deduce if a signature is valid rather than finding what the signatur...
I stumbled across a forum thread where security researcher Thomas Ptacek seemed to have negative feelings towards GCM. I had always thought from prior readings that GCM was the current gold standard for efficient, secure, easy-to-use AES modes? Here is a summary of the “news.ycombinator” thread: tptacek: But CTR+HMAC ...
I have seen that a couple of companies (like Google, Apple HomeKit) are adding "ChaCha20-Poly1305" as an encryption option. Poly1305 requires algorithm to encrypt the nonce. The Poly1305-AES specification uses the AES algorithm to encrypt the nonce, but also says "There is nothing special about AES here. One can replac...
As I hope everybody is well-aware, re-using the key for CBC-MAC and CBC is a really bad idea. Now, there's also the paradigm to prepend the message length to the CBC-MAC (as "associated data") to ensure CBC-MAC is resistant against length-extension attacks. Now my simple question is: Does this simple length prepending ...
Given set of random strings $w =\{s_1, s_2, s_3 ... s_n\}$ are there any algorithms to construct single master secret $S$ from them? Subsequently we should be able to deconstruct the $S$ back to initial set of strings $w$. This is opposite of traditional secret sharing algorithms where given $S$ could be shared into s...
Consider the following block cipher mode of operation: \begin{align} tag_0 &= mac\:key\\ plaintext_0' &= plaintext_0 \oplus iv\\ E(tag_0 | plaintext_0') = C_0 &= tag_1 | ciphertext_0\\ E(tag_1 | plaintext_1) = C_1 &= tag_2 | ciphertext_1\\ ...\\ E(tag_N | plaintext_N) = C_N &= tag_{N+1} | ciphertext_N\\ cryptogram &= t...
I read about ChaCha20 being used in TLS by Google, SSH, and towards standardization in general. What's the appeal of using something other than AES, what with AES receiving dedicated CPU instructions on various architectures to make it so efficent?
I am trying to compare the encryption and decryption speed of the RSA and the DRSA scheme with same public key $(n, e)$ and private key $d$ (using SageMath). For $1024$ bits long $n$, I got the following data Encryption of RSA(CPU/Wall time in sec): 0.36/0.66 Encryption of DRSA(CPU/Wall time in sec): 0.01/0.03 Decrypti...
Some days ago I asked for a help to find and correct the problems of an authentication protocol. I closed the post because I was convinced I can correct it but, unfortunately I'm having some troubles. The "old" post is the following:I'm dealing with this problem: establish if the following protocol is 'secure' and, if ...
If the permutation in AES (or other ciphers) were randomly generated or dependent on the key, would it not be stronger against differential attacks? If this is so, then might we need fewer rounds for the same level of security?
I understand that the irr. poly is used to form the s-box (and inv. s-box), the key schedule and the mix columns. But could we use a different irr. poly for the mix columns and another for the key schedule (using, of course, a different s-box)? Thanks...
How can we modify classical cryptography system to provide non-repudiation? I want to ensure non-repudiation in symmetric key cryptography so that we can find out who is sender of a particular message.As sender and receiver share the same key, we can't find out who the sender was.
In a file users' password hashes are stored. There are 2 approaches to reduce the probability that the password is guessed. Increase the size of the salt from 12 bits to 24 bits. Increase the length of the password to 16 characters by hashing the first 8 characters using current hash function, the second set of charac...
Let's say that Alice wants to communicate some secret value $S$ to Bob through a public channel in a way that other people don't know what the value was. To do this, Alice publishes that secret value to the public channel, along with $N-1$ other values, making a list $L$ which has $N$ items in it. Before this communica...
I know that RC4 is weak. However, I don't know if two RC4 streams XORed with each other can be attacked in the same way that one can, especially if $n$ bytes are dropped. Assume keys and IVs are independent and random. (This is purely theoretical, I don't plan on using it in practice).
Suppose I would like to encrypt some data using AES-GCM because it has hardware support on my processor and it is secure. Unfortunately, I don't like the 96-bit nonce size, because I want to randomly generate the nonce each time (to avoid having to keep state). So instead of it, I use my 256-bit master key to encrypt 3...
I don't trust Microsoft BitLocker because it is closed source, which makes it so people can't audit it. But now I'm really interested in how its recovery code works. In my own knowledge, encrypted data can't be decrypted without knowing the key, but BitLocker breaks it. So, I have three questions want to ask: How does...
I have a series of messages (limited to only a-z and A-Z) that are encoded such that the sum is taken of every two ASCII values and concatenated. For instance, the message hello would be decomposed into the pairs he, ll, and o which would then become 104 + 101, 108 + 108, and 111 which finally is output as 205216111. ...
I am implementing a Certificateless Cryptography Algorithm by referencing the paper An Efficient Certificateless Encryption for Secure Data Sharing in Public Clouds. In this paper on page no. 4 during setup phase they have mentioned to choose hash functions (in my case it's SHA-256). But some of the notations are confu...
I am working on an assignment and I am stuck with the last part of proving witness hiding for the protocol. I have previously proved it is witness indistinguishable, and it has q (primer number chosen as in Schnorr's protocol) different values for the witness. The protocol goes as follows: To prove the witness hiding...
More precisely, I am looking for hash functions where the internal state can be decomposed as a vector of integers of size 63. That is, machine integers where one of the bits is fixed and unusable.
I have a function that takes an $m$ byte inputs $x_i$ and maps it a 32 byte outputs $y_j$. The hash function is defined as: $$y_j = \sum_{i=1}^{m} (x_i)^{i-1} \pmod {127}$$ The input is restricted to the ASCII characters 'f' to 'u'. The input letters are in alphabetic order. How can I recover the inputs $x_i$ given the...
I have read “How does order-preserving encryption work?”. After that, I completed order-preserving encryption on integer data. Now, I have four questions in this subject: Is it possible to apply sum operation on encrypted integer data. Is it available for string data? Can i make string operations like finding an encr...
How would you prove that Huffman coding $C$ is a prefix code, i.e $$\forall x,y \in C,\ \forall z \in \lbrace 0,1\rbrace^*,\ x\not=y||z$$ Using induction according to the number of items to code? The base step would be easy, but I don't know how to prove the inductive step.
Is there a key for AES-128, 256 etc, where cleartext equals ciphertext? (regardless of modes like chaining or ctr-cbc)
OCB mode seems to represent the state of the art in authenticated encryption modes, largely due to its speed – it is faster than GCM even when GCM has hardware support. Its only drawbacks seem to be that it requires frequent rekeying ( every $~2^{13}$ blocks if one wants to match GCM auth robustness when very large am...
Given a plaintext: Now is the time for all good men to come to the aid of their country because the quick brown fox jumped over the lazy dog. and a substitution ciphertext: Mpe od yjr yo,r gpt s;; hppf ,rm yp vp,r yp yjr sof pg yjrot vpimytu nrvsidr yjr wiovl ntpem gpc ki,[rf pbrt yjr ;sxu fph/ It is trivial to...
I am attempting to break 3-round SPECK48/96 using a known-plaintext attack, provided with 10 PT-CT pairs. Here is a diagram: I have seemed to almost figure this out, but I cannot figure out how the right side affects the state of the text, due to the left rotation. Say I am trying to attack the first set of 8 bits on ...
Suppose I run a multiparty protocol. At the output stage, I have the function output in a secret shared manner among all parties. Now I want all the parties to commit to their value of the secret shares In essence, suppose every party $P_i$ has a share $Y_i$. Every party should commit their value = $Com(Y_i)$ My probl...
From Wikipedia I read SHA-1 function produces an output of 160 bits and expects a max message size of $2^{64}-1$ bits. Is that right? If I order all possible inputs I would produce $\approx 2^{2^{64}}$ different bit array inputs, right? Not sure at this point if message 0 is different from message 00. Can we say that S...
I have read that if the DDH problem could be efficiently solved, the IND-CPA would not hold for ElGamal. I don't see why it makes ElGamal less secure if you have $g^a$, $g^b$ and $g^c$
Say you are given an efficient deterministic algorithm 'I' that can invert the RSA function on 1% of the points in $Z^*_{N}$. That is to say that if y $ \in $ $Z^*_{N}$ is a "good" point for 'I', then $(I(N, e, y))^e$ = y. (You don't know what these "good" points for 'I' are, however.) Show that you can use 'I' to bui...
I am trying to better understand homomorphic encryption, but I feel like I keep getting inconsistent information in the papers that I am reading. One of the papers I am reading says the following: Earlier, homomoprhic encryption was defined as a form of encryption where a specific algebraic operation performed on p...
Why is 128-bit encryption considered good enough for medium term security only? How is expected to be eventually broken? Quantum computing or brute force attack?
Does increasing or doubling the size of salt result in improved security? It will require some extra time to brute force the passwords, but any added advantage?
I notice that in many research papers (viz. "Universal hash proofs and a paradigm for adaptive chosen ciphertext secure public-key encryption" by Cramer and Shoup) the authors showed that their cryptosystem is IND-CCA secure under standard model. What does it mean? What does an adversary have access to in a challenger-...
I read on stack overflow that OpenSSL performs ASN1 encoding to the hash before signing it for, for ECDSA. In other words, OpenSSL performs the following steps when for an Elliptic curve key -sign is called: Calculate $H = Hash(M)$ Encode $H$ into ASN1 standard $H’$ Sign $H’$ If the above is true then in order to a...
Assume that I want to leave an encrypted message to a group of $n$ people in a way that they can only decrypt it if they work together in the following sense: For some fixed $k < n$ every sub-group of $k$ or more people should be able to decrypt the message while less people do not suffice. One way to do this would be ...
What's the minimum number of random sample points needed in Kocher's timing attack, so that we can determine enough valid measurements of $A_{i,r}$ and $D_{i,r}$? I'm working from this paper: Volker Müller, Experimental Results for Timing Attacks on Elliptic Curve Cryptosystems (pdf), in Proceedings of the National Sem...
Threefish has up to a massive 1024 bits of security. Is it the only cipher with such overkill security?
I am new in this world of cryptography and while reading some articles I got stuck into something that I did not understand correctly: the use of hash based on random cryptography. On my knowledge, when I am using any program which needs authentication the program uses a Hash to save the password into the database and ...
Typically MPC protocols that are secure against semi-honest adversaries recommend the use of the revised GMW multiplication protocol by Gennaro et al. This is not the case against Active adversaries where protocols of the likes of SPDZ, VIFF and Oralndi prefer the use of the well known Beaver's multiplication triple. ...
Is it possible to make RSA-PSS signing deterministic without loss of security? Specifically, I would use Blake2b of the key and message to generate the salt.
I've been hearing a lot of scare talk about PKCS1 padding attacks. Is PKCS1 v1.5 safe in signatures as it is practically transporting only message digest? I'm using it in one of my applications so i'd like to know if it is safe to keep using it.
Suppose I have a service in which I allow users to share their WiFi connection. When sharing their connection, users provide their WPA PSK password to my service. Now if somebody wants to use this shared WiFi connection, is it possible for the service to get the user connected without him actually coming to know of th...
Let's say I want to generate my own elliptic curve with an order whose bit length is $n$ (specifically 2048, 4096, and/or 8192)? How would I do this? What needs to be done? What software can do this? How long would it take for a given size?
How to attack polyalphabetic affine cipher with only the ciphertext? A polyalphabetic affine cipher can be seen as the composition of an affine cipher ($p \mapsto c \equiv a \times p + b \pmod{26})$ and a Vigenère cipher. Consider we have a key such as $(a_{n\ mod\ 3},b_{n\ mod\ 3}) \in [(3,1); (7,2); (11,8)]$. For...
You can do $2^{30}$ encryptions per second and the key size is 64 bits. $2^{64}/2^{30}$ should give me the time taken for a brute force attack? What if you double the key size? How can I calculate the maximum and average time taken for such an attack.
In cryptography, what does the Top notation mean? It resembles a capital T: T In particular, I saw it in the follwing context: $c = (c_1,c_2)^\top$ where $c_1$ and $c_2$ are homomorphic ciphertexts
When encrypting same data with AES, encryption time for the first encryption is longer than the second one. In the same program, I have written encrypt() function twice and measure elapsed time. I don't know why?
Is it possible to create a program to find the collision of 2 different messages with the same first 32 bits using sha1 hashing? I tried using a while loop, but it ran endlessly as though no match were found. I am doing this in Java. These 2 messages must contain "abc123". My while logic is adding a number to the end ...
NIST published methods for Format-Preserving Encryption and there is a link in the document giving examples for FF1 methods. I am confused by the value of R given in the examples. $R$ is the output of PRF, and it should be 16 bytes. But all the $R$ values listed in the file are 32 bytes. Why is that? For example, P...
I am a beginner to homomorphic encryption scheme. As far as I think, it is just a kind of concealing real value without using standard encryption algorithms such as AES,DES or RSA. For example , for concealing value of $3$, it expresses $6$ where ($6=2 \times 3$). Decryption is done successfully if user knows $2$ (secr...
I have a small block of data (16 bytes) that I am required to encrypt, store (in an unsecure, visible location). Later I have to retrieve and decrypt it. I must use AES-CBC and a user-entered password. After decrypting the data, I need to know if the correct password was used (so I can reject the data if not). My ini...
I have a 30000 user passwords and usernames stored in a table on a database in which the passwords are stored as hash where ,I need to guess the passwords for all users and I have the hash function which its output is 32 bit in length. My questions is: How much time do I need to guess that if I use collision attack? ...
So from my understanding of verification specification version 3, a Helios election proceeds as follows: A voter retrieves the system's public key to encrypt their vote & submit it. The voter gets a fingerprint representing their vote. When the election period is over, a list of all names & their fingerprints are made...
If attackers can strip off RSA / EC / -DSA digital signature and conduct CCA on AES-CTR or CBC payload, why can't they do the same for AES-GCM?
I want to know if AFsplit(random_data_input, stripes, digestmod=sha) output is indistinguishable from random data. The attacker only has access to AFsplit output data. EDIT: This question is too vague as the answer depends on the randomness hypothesis taken about random_input_data. Take care of it reading the proposed ...
As per topic, why can't we use the first block as MAC instead of using the last block? what's the rationale?
I am trying to prove the security of my system using the hardness assumption of the approximate-GCD problem using contradiction, i.e. If the attacker is able to break in our scheme, then attacker would be able to solve the approximate-GCD problem. I am stuck at the point where I proved that the complexity is O(2^rho) u...
Suppose: $m$ is a positive integer. $n=2 \times m$. $H: \{0,1\}^{*} \rightarrow \{0,1\}^n$. $p$ is a password. $s$ is a salt. $K=\{0,1\}^n$ is the derived key. $PBKDF(p,s)$ derives a key from $p$ and $s$ using $H$ in some manner. $K=PBKDF(p,s)$. Given the birthday paradox, is the key strength here $m$-bit or $n$-bit?...
I recently went through the list of available KeePass plug-ins and noticed one that advertises support for HOTP as a means to derive the database key. Now I trust the developer of this plug-in who is Dominik Reichl, who also signs the KeePass releases, so I doubt this is some sort of KeePass-only feature that won't act...
Consider the stream cipher that consists of 3 LFSRs, with the output of one coming being used to determine which of the other 2 is used that clock cycle. Both the IV and the polynomials are secret. Is this broken? I know that the related shrinking generator is not, but needs buffering to avoid timing attacks.
Suppose: $H: \{0,1\}^{n} \rightarrow \{0,1\}^{n}$. $H$ is bijective. It is difficult to derive $x$ from $H(x)$. Is this type of function possible? What would the strength of it be? I realize that RSA and discrete logarithms can fulfill this, but I was thinking of using standard operators instead of those two. Other p...
Is it possible for the Rho method against an Elliptic Curve to take more than the sqrt of the total state space? It the reason why this is not generally done because of a meet-in-the-middle attack?
One day ago,i downloaded a pdf that requires password then i search a software to decrypt the password that's s/w called pdfcrack Then i install pdfcrack and run a cmd in terminal pdfcrack -f encrypted.pdf then it shows a some of sentences like that "Average Speed:13343.1 w/s. Current Word: 'txgeg'. " My doubt is when ...
I'm trying to understand the notation used in the literature for Pairing-based cryptography. I know (and I hope I've understood it well) from Wikipedia that $\mathbb{Z}_p$ is the finite field of prime order $p$, where $p$ is the order of the field $q$ and the characteristic of the field and $q=p^n$ I came across this...