instruction
stringlengths
32
27.2k
In many cryptographic protocols, some information is transmitted within smart cards. So, what is a smart card? Is it a physical card? What are they used for in cryptographic protocols?
I am trying to generate 2 x509 certificates with the same signature but different values in the common name field, based on md5 collisions, as it was specified in this paper (page 7). Now I have successfully created 2 files with the same md5 value, that are valid certificates, but the public key field doesn't contain v...
what are the main pros and cons of proving the "security" of a crypto scheme under simulation proofs instead of game based proofs?
Hopefully the question isn't too broad or off. Basically, are there any practical, and by practical I mean secure enough that a ciphertext only attack is infeasible, key-less cryptosystems? For example, there's the Caesar Cipher (I'm aware of the fact that it can pass as a special case of the shift cipher with the key ...
What is the expert cryptographic opinion on the following? Assume that there is a web server and a Client on web page who calls an OTP ([One-Time Password]) web service on the server which: creates a RSA key pair generates a random 10 digit string - the Message Encrypts the Message with the Public Key component to gen...
Possible Duplicate: Why is H(k||x) not a secure MAC construction? I've the following problem: two parties, A and B, share a secret key Kab. M is a plaintext message, H an unkeyed hash function A send to B M, H( Kab | M ) (where | means concatenation). If we want to provide data origin authentication and data integri...
While reading this article on rank attacks on STS (a public-key scheme based on Multivariate Quadratic (MQ) equations), I stumbled upon some claims that I've also seen in other presentations on rank-attacks. However I'm not able to see why this claim follows. A description of STS and rank-attacks follows. If you are...
I'm testing an implementation of Bitcoin, which uses the curve Secp256k1 for ECDSA, and I want to see how it handles the point at infinity ($0$) if present in a signature. For example, r could be the x coordinate of the encoding of the point at infinity. How is the $0$ encoded? Can it be encoded? I found that bouncyca...
I am writing a program which will use Chi-Square to determine which is the correct keyword for a ciphertext via Vigenère cipher. I came across a website that describes the Chi-Square statistics in a rather simplistic manner and had also written some code to achieve my goals. However, the actual keyword does not seem to...
I want to calculate the time complexity of two encryption and decryption algorithms. The first one (RSA-like) has the encryption $$ C := M^e \bmod N $$ and decryption $$ M_P := C^d \bmod N. $$ Assuming $n = \log N$, $m = \log e$ and $k = \log d$, I think they have time complexities $O(n^2 · m)$ and $O(n^2 · k)$, resp...
Main cipher objective : Generate a keyed CSPRN stream, that does not expose useful information about the state of the CSPRNG, and xor this with the plaintext. To prevent an attacked who could somehow recover state or key information from one ciphertext from using this on other ciphertexts, a "random section", here call...
We are having a requirement to store large files (~1GB) encrypted and decrypt them when reading. We are looking to use AES-CTR or AES-GCM mode to encrypt the data. There are scenarios where we want to divide the files into chunks/blocks and then decrypt these chunks in parallel. So my question is that is it possible to...
The compression function of SHA-1 when used in Davies-Meyer mode adds its input to the chaining values at the final step. For the first message block, the IV is used as the input and in the next step, the previous block's output (as specified by Merkle-Damgård) is used. These values are fed to the last round of the com...
I'm studying the Kryptos sculpture with its cryptographic puzzles K1 to K4. Similar to the "palimsest" keyword for K1, the keyword "abscissa" for K2 was determined by brute-force. To better understand the puzzle as a whole and ultimately solve K4, it's important to understand how the "agent in the field" might have dis...
Throwing normal dice, one can get sequences of digits in [0,5]. In practice, which is the best procedure to transform such sequences into a desired number of bit sequences?
Assume we have a public message board where anyone can send a message to. If plain messages are used, anyone can impersonate anyone. The goal is to disallow impersonations. We can use public key cryptography and users have access to secure means of distributing their public key (e.g. their personal website). There is a...
Pretty simple question - but I can't seem to find much information about it. What exactly is a tweakable block cipher? How do they differ from traditional block ciphers? What is the 'tweak'? Is it just a sequence of bytes? Does it have any special qualities? Are tweakable block ciphers more suited to any particular s...
I think CrypTool is great software. And what I find most useful in it is visualization of algorithms such as Caesar, Vigenere, AES, DES. And my question is: does anyone know other tools which are intended for visual explanation of basic cryptography and related topics such as prime numbers, elliptic curves, finite fiel...
Say we do know $b$ but not $k$, and are given $g$ such that $g\equiv b^k\pmod p$. And say there exist factors $E = e + m'p$ ($e \equiv b^i \bmod p$) and $F = f + m''p$ ($f \equiv b^j \bmod p$) of $g$. Then $EF = g + pm = b^k$ for some $m$, $m'$ and $m''$. So if we can find the right $(m, m')$ we can factor $G = g+pm = ...
I am looking for practical constructions for Full Domain Hash. I have read Random Oracles are Practical by M. Bellare and P. Rogaway, the construction suggested on page 8, under "Uniformity: a technicality", but it's unclear whether that is producing a full domain hash, or just ensuring the message is well-formed using...
Definition ${H_1}^{K_1}(X)$ means data $X$ hashed by keyed hashing algorithm $H_1$ with key $K_1$. Short question Is $H_1^{K_1}(H_2^{K_2}(X))$ equal to $H_2^{K_2}(H_1^{K_1}(X))$? Is $H_1^{K_1}(H_1^{K_2}(X))$ equal to $H_1^{K_2}(H_1^{K_1}(X))$? Long question My web application is storing a hashed password in a database...
So basically my problem is the odd result i get when measuring the time it takes to generate a ECDH key in java vs. the time it takes to generate a DH key. I compare the time it takes to generate: 192bit ECDH-key to a 512bit DH-key 224bit ECDH-key to a 1024 DH-key Now I expected the ECDH key pair generation to beat r...
I have a number of different systems sending me email addresses, but I don't actually need the underlying email, just a hash of the email address. I know I can compare hash values to find matches across the senders, which is all I want to do, but what if each sending system uses a different salt or hash method. Is the...
Please refer to this secure index paper. On page#6, a trapdoor is defined as Trapdoor(Kpriv, w): Given the master key Kpriv = (k1, … , kr) and word w, output the trapdoor for word w as: Tw = (f(w, k1), … , f(w, kr)) Can someone please explain it to me using an example? Let's say we've a word hello for which we w...
Some of the most effective cryptography methods and algorithms are based of factoring large prime numbers (e.g. RSA). I'm curious whether there are some other cryptography methods. Somethings that is very mathematical or physical based. Of course, I know about quantum cryptography, but I'm interested in other things al...
My question rather splits into two sections: Is AES correctly and security implemented in the .net Framework? Are there any reviews of implementation mistakes that would weaken the security of AES (e.g. against timing attacks)? Error-checking with hash-then-encrypt I have a file i wish to transmit (encrypted), and wou...
I am making a call with parameters from application "A" to a web application "B". Parameters are in the query string of the URL. They don't need to be hidden. But I want to be sure that nobody can change the parameters. And web application "B" must ensure that the query comes from application "A". So, I encoded the par...
Alice is communicating with $n$ people. We do not assume that the $n$ people don't trust each other or trust Alice. Alice doesn't trust them either, and needs to assume that they will not form a coalition against her, so we assume the $n$ people cannot communicate with each other (except through Alice, if she agrees). ...
I need an untrusted client to generate a random public/private keypair (in particular, an Ed25519 keypair, which can be generated really fast), but I'm only allowed to see the public key. The randomness is important because the public key is used in attack-sensitive ways such that being able to influence it more than a...
Wikipedia says in reference to the elliptic curves officially recommended by NIST in FIPS 186-3: Five prime fields for certain primes p of sizes 192, 224, 256, 384, and 521 bits. For each of the prime fields, one elliptic curve is recommended. The first four bit sizes are immediately familiar from other cryptographic...
I have a couple of related questions: I read about an estimate, ascribed to Shannon, of the entropy of English text to be between 0.6 and 1.3 bits per letter. The modern day corpus, including the huge and exponentially ever expanding volume of materials accessible via the Internet, is different from the one available a...
i want to generate random number for example from [1..100]. The algorithm which would generates random number should work similarly like a "Linear congruential generator", like this: $X_{n+1}≡(aX_n + c)\ (mod\ m)$ Where: $c$ - increment should be something like 98979817 $a$ - should be used for security and should be ...
The cipher is an triple key polyalphabetic cipher also known as an Quagmire IV by the ACA. An example would be here: Quagmire IV example and info (pardon the ads) I posses the IV key and the PT key. The IV key runs vertically and sets the shifts of the lookup alphabets for the ciphertext. The IV key is the length of th...
Is there any security concerns with building a CSPRNG using a broken hash function like MD5 or SHA1? The design is such that a CRC-like function is used for mixing entropy and MD5 is used as the output function. If this is a security concern, what is the technical reason? What would be a better replacement when effi...
I've heard again and again that many crypto systems have been broken in the past for one reason or another and that it is best to use one that has been peer reviewed, etc etc. However, I've yet to see a source (website, book) that gives information about these systems. Is there such a thing?
How does padding in PMAC work? I have been told two stories: Firstly, I have been told that it works similar to CMAC padding, and secondly, I have been told that it does not need padding. I find the second story very strange as I think one could make an existential forger quite easily. But if PMAC pads like CMAC, then ...
In various articles it is mentioned that for secure communications, the recommended key sizes are 128-bit key size for symmetric encryption (which makes it $2^{128}$ possible keys?) and 2048-bit key size for asymmetric encryption ($2^{2048}$ possible keys?). Why do they differ so greatly? It seems like I am missing a v...
How can I understand the term RSA key normalization? What exactly is done in the process?? Please explain.
I asking for advice on how to check strength of an encryption algorithm.
$E(k_1, pt) = c_1, E(k_2, c_1) = c_2, D(k_{new}, c_2) = pt$, where $k_{new} = f(k_1, k_2).$ Sharing $k_{new}$ and $k_2$ should reveal no information about $k_1$. Clarifications: Being able to decrypt the ciphertext $c_2$ knowing only $k_{new}$ is the first desired property of the system One cannot derive $k_1$ knowing...
I was looking for more realistic alternatives to the ROM for describing hash functions in theoretical proofs. I came across the common reference string model (where hash functions can be modeled as having been picked from a family of functions). Are there any other? EDIT: https://cstheory.stackexchange.com/questions/16...
In the context of a new largest (mersenne) prime number being found this week - The largest known prime number is now 2^57,885,161 − 1, and it took 5 years to find it since the last largest prime was found. But we know that various asymmetric encryption algorithms require ridiculously large primes which are used as the...
I understand there are specifications for public-key fingerprints that use modern hash algorithms like SHA2. What are they?
I am new to cryptographic issues and from what I googled so far I could not retrieve the information I need. Consider the use of AES-128 in CTR mode. Let M be the set of possible plaintexts, for example M can be all the bytes sequences of a length lesser or equal than a specific integer n. Let K be the private key and ...
I have a text file that has been processed by the SNOW steganography tool that uses ICE encryption. However, I do not know the key that would enable me to decrypt and retrieve the message hidden. What tools are available, that are proven to have worked that would help me in retrieving the key? Edited: instead of askin...
I have been academic papers about Rijndael, Serpent, and Twofish, and there is this term that is vague to me. I cannot find a tangible definition in google. Can someone briefly define, describe, and/or give examples about security margin and where it is used.
I'm trying to implement a cryptographically secured storage site (not Mega, or anything similar) and am trying to prevent the user's password from ever touching the server. The password is used to both log in and generate a PBKDF2 key for AES in Javascript, so the plaintext password should never leave the client machin...
I need an implementation of AES(Rijndael) in java that allows use of a 320-bit key. Please suggest a reliable implementation
For example, two people want to know who is the older, without disclosing their age. Is there a secure way to do this without a third party involved?
I need to find a prime $p$ of $1024$ bits with a $160$ bit sub group size $q$, such that $q|p-1$ , and $g$ is the generator of the sub group size $q$. I'm looking for the numeric values of $p$ , $q$ and $g$.
Another recent question on security margin included in its answer the discussion of how many rounds are broken so far. What is the definition of a round?
I thought of implementing DES modes of operation as a project...But my guide asked to change or to modify the DES algorithm in such a way to overcome drawbacks of DES...So is there any way to do changes?IF so how?and could you please give me idea on how to bring changes in any of 5 modes of DES.please help me... Thank ...
Is there a name for the property of a cryptographic algorithm that the operations for encryption and decryption are identical, i.e. $E_k(x) = D_k(x)$ and accordingly $E_k(E_k(x)) = x$? An example for this would be most stream ciphers; are there any other, possibly block ciphers, with that property? It seems like a good...
if we believe 256bit keys are secure in AES against any brute force attack, is that possible we use a KDF (convert user's weak entered password in truecrypt into a fixed AES key) with too much round and cycle to make a weak password (with All ASCII printable characters) secure as a true binary 256bit random key ? assum...
I have a question I can't solve from one of the courses I'm currently taking: Show that given a legitimate ElGamal signature $(S,R)$ on a given message $m$, an attacker can compute a signature on messages of the form: $m'=(m+bS)a\mod p - 1$, when $b\in Z_p^*$ is chosen as the attacker wishes and $a=g^b\mod p$. H...
Can we replace the XOR operation in the DES algorithm with some other operation? If so, does it work for both encryption and decryption?
Background: I am trying to get an understanding of using a hash of a passphrase as a secret. Example: sha256("EasyToRememberPassphrase") -> secret. I am assuming a properly designed hash function used this way above will yield a secret with the same or fairly similar entropy as the input passphrase (or the size of the...
I am trying to break a packet format. The packet format simply packs several files into one big file. The file contents are plain. But the index data which contain offsets, file sizes and filenames are encrypted. The index data are about 1 KB and compressed by zlib (the DEFLATE algorithm with no zlib or gzip wrapper), ...
In all textbooks I used the Diffie-Hellman key exchange is under "public key cryptography". As far as I can see it is a method to exchange a key to be used with a symmetric cryptographic algorithm, so it falls very naturally in the area of symmetric key cryptography. So where does DH stand in the split between symmetri...
David Kahn in his book "The Codebreakers" wrote about Jefferson's wheel cipher, saying that To this day the Navy uses it… (the book was first published in 1967) Are there any historical accounts of successful cryptanalysis of that cipher?
Is breaking AES NP-hard? Can the security of AES be reduced to a NP-complete problem? If it is reducible, what does the reduction look like? If it is not reducible, why do we assume it is secure?
RSA doesn't provide semantic security when used unmodified, and neither does the commonly used PKCS#1 v.1.5 padding scheme for encryption. Is this a problem for hybrid cryptosystems at all? My suspicion is that it isn't, since the plaintext message of the RSA encryption should be a random string used as an encryption k...
As a personal project, I want to implement MD5 on an FPGA, but I have some doubts about the specifics of the implementation. My first source of how the algorithm is implemented was the RFC 1321, where there is a pseudocode that explains that round 1 will be performed the following way: /* Round 1. */ /* Let [abcd k s...
I am looking for a secure key diversification function to create individual AES keys for a local smart card deployment. The keys need to be derived from a secret master key and the smart card serial number. Key calculation can happen on the host system. Is it secure and practical to use PBKDF2(password=master_key, salt...
In SRP-6 $B$ is calculated as $B=kv+ g^b, k=3$. What is the purpose of $k$, and why was it fixed as $3$? (In SRP-6a, this value $3$ is replaced by $k = H(N,g)$, but this question is about SRP-6.)
Shannon's idea of diffusion is fundamental to cryptography. Besides being a descriptive idea, is there any work on measuring or expressing it? Saying something like "System A has more diffusion than B" or "The information in bit x is diffused 1/3 into bit y, 1/3 into bit z, and the remaining third among 11 more bits". ...
So I was watching a popular series tonight (Person Of Interest) when suddenly during a frame change I noticed a very quick blue screen with writing. At the time I never thought anything of it as it was to quick, it was embedded within a one second interval gap at 20:50 to 20:51. I tried using my media player to pause o...
I reference object in some of my code in hashes. The signature is itself is another object separate from the one I am signing (for obvious reason). I consider simpler to simply sign the reference to my object (its hash), but I wonder if it is considered secure. Here's a more complete explanation: A: Is the data object...
I am working towards building a format-compliant encryption system for pictures. The aim of it is to be able to obscure specific areas of a picture (i.e. faces, car license numbers...) while keeping the rest unaltered. The aim would be, for instance, being able to publish a picture on any given social network, making t...
I came across some code in our project that encrypts usernames (limited to 50 chars, most are less than 10) using the following parameters: IV size is 16 bytes Key size is 32 bytes Algorithm is CBC-AES (256bits) Is there a security issue because of these parameters? Why would you use CBC and not ECB with a key size lar...
In SRP-6a, the public key $B$ of the server is normally sent after receiving the public key of the client $A$. Is it okay to send $B$ and $s$ after the client sends its username $I$, but before the client sends $A$?
If I have a string encoded with AES CBC with PKCS#5 padding, how can one possibly decrypt/crack it? What are the approaches that one can take to break its security?
Among other sources, this Wikipedia entry states that triple-DES using three separate keys $(k_1, k_2, k_3)$ is vulnerable to meet-in-the-middle-attacks, while triple-DES using only two keys $(k_1, k_2, k_1)$ is not. Why is this attack possible if all the keys are different, but not if the first and the third are the s...
There is a side channel attack on tamper-resistant USB cryptographic tokens using padding-oracle, described by Bardou, Focardi, Kawamoto, Simionato, Steel and Tsay, titled "Efficient padding oracle attacks on cryptographic hardware" (INRIA; CRYPTO 2012, LNCS Volume 7417, 2012, pp 608-625), full paper, brief description...
Searching for "small blocksize cipher" finds a number of discussions on the topic, mostly refering to FPE. This one in particular suggests using AES as the round function of a Feistel network. The problem is on some embedded devices, the use of AES is too complex, so a tradeoff between cipher strength and complexity is...
I am new to crypto and trying to understand if it would be insecure to use a cipher such as AES to encrypt a key with the same key. If it is insecure, then why would it be insecure? Basically, something like this: encrypt(key, key) What happens when both key and message are the same (128 bits)? The obvious question wo...
I'm looking at using Scrypt as a KDF. Assume the following: the input will always be high-entropy random bytes generated by a CSPRNG the length of the input can vary from between 8 to 32 bytes the input-bytes are never re-used for generating another key the salt is also generated by a CSPRNG dklen (aka, output key le...
Sorry about the horrible title, didn't now what to say. I'm trying to avoid having to send an IV with every message purely to keep packet sizes down, so I thought of a method to establish a "IV Pool". This is how I thought it should be: Client ---- Handshake ---> Server Server ---- Handshake ---> Client Client and Serv...
In the public-key system RSA scheme, each user holds beyond a public modulus $m$ a public exponent, $e$, and a private exponent, $d$. Suppose that Bob's private exponent is learned by other users. Rather than generating a new modulus, Bob decides to generate just a new public and a new private exponent $e'$ and $d'$. I...
Is it possible to generate signature only from Public key. See example below where i have valid signature but what if I change hash ? Is then any way to do this? Public key(160 bytes): 024000004800000940000000602000000240000525341310004000001000100B7 373AAC1521A3EF2F5C72DFD3D3F715C56810F2A222AD9179D9DEE099389B7A672 8D...
So, as an exercise to greater understand some things about cryptography, I decided to try and implement GOST 28147-89, which uses eight 4x4 S-Boxes. I can grasp the concept of putting 4 bits through the S-Box and getting four out, but how would one reverse this? Furthermore, how would one reverse uneven S-Boxes, such a...
When you try to connect via SSH, you see a signature which is short but I heard it is even stronger than sha256. It is perhaps stronger because it uses more rounds. Is there a hash function or a method on current hash functions that use more rounds or something like that to somehow prevent collision attacks and provide...
Has anyone come across any implementations of Ntru TLS? I'm working a project for uni that does quantum secure encryption. It relies on a mix of Ntru & AES, but I can't find an implementation of Ntru TLS anywhere. (CyaSSL claims to have one but it needs a license to compile, I've contacted them, waiting to hear back) S...
Suppose that we have a sequence of $N$ digits which is produced by a Linear Feedback Shift Register (LFSR) and the shortest such LFSR is of length $L$. A very important tool in cryptanalysis of stream ciphers (among many other things) is the Berlekamp-Massey algorithm; if $2L\leq N$, this algorithm will produce the uni...
I am designing an implementation of RSA . I recorded computation times in Java by using System.currentTimeMillis(). It returned an encryption time of 0.05 ms and decryption time of 0.55 ms, or a ratio of 1:11. This seems like a large difference. Is it supposed to be this way? //here my key has 256 bits for (;;) { ...
A lot of papers use these terms but I do not find a proper explanation of them. Can somebody tell the meaning / difference / intuition / application and if possible with an example.
I have genereted two equal session keys on client and server successfully. But I couldn't understand how each other should validate that they have same session keys. On the client I generated a SHA1 hash with equation p = SHA1(A | B | S) where A and B are public keys of client and server and S is the SHA1 hash of the s...
I'm not a Cryptography expert, but i've seen this topic sometimes on the Web: Master decrypt keys. Most of the people said that "Master decrypt key" does not exist. This makes sense if you developed your own Cryptography software. But if a company releases a cryptography software, where the user must enter the content ...
I'm working on a program that uses an ECC keypair in a (password protected) PKCS12 file (.pfx) to encrypt files. I like this method because I think it will be higher security (using ECDH to negotiate the key) and more easy to use (one PIN for all files). How I'm going about this is by using the public and private keys ...
This is giving me a brain ache now... If I have AES-128, block is 128 bit, then every plaintext (128-bit) can be encrypted to some ciphertext that is also 128-bit. This is the block size. But: 128-bit block can have 2^128 different values. So if I have 128-bit key - then it seems to be natural to have every different k...
In the definition below, what exactly does it mean for the adversary (not even sure that's the correct term?) to equal one? $$ \underset{K}{Pr} \left [A^{F_k(\cdot)} = 1 \right ] $$ Source (Page 22/35?)
Consider the Blum-Goldwasser encryption scheme as described on Wikipedia. I was told that it was not IND-CCA-2 secure. I heard there was malleabilty, probably it has to do with XOR-ing. But I do not see the point. As stated in the Wikipedia article, in step 2 of the encryption, we choose a random element. So what we xo...
Apologies if this question is not in the right place. I've recently been looking through some RSA certificates ( specifically, Android apk .rsa files) and I'm having trouble deciphering the one and two letter combinations in the Owner/Issuer lines. ex: CN, OU, O, L, ST, C L, ST, and C are Location, State and Country, I...
I have a fairly simple Python program using PyCrypto to use AES+CBC to encrypt a stream of input. In order to adhere to the 16-byte input size multiple, I've implemented PKCS#7 by hand. (While I know implementing cryptographic methods by hand is generally a bad idea, padding 1-16 bytes of data isn't exactly the hardest...
I'm encrypting a file using AES-256 in CBC mode. I'm padding to the 16-byte input multiple by using the PKCS#7 limit. The problem I'm currently having is that if I'm transferring or reading the encrypted file over a socket, I won't know when the encrypted file has been finished, as I'm reading it in chunks. Because of ...
Browser vendors use ASN.1 encoding for RSA certificates in the TLS protocol. RSA public keys are just a number, so why do we need encode them to something else? That increases the risk of security problems.
After reading some excellent papers on SipHash, I understood that good non-cryptographic hashes such as MurmurHash and CityHash are not secure for MAC usage, due to a certain type of DDos attack becoming possible, thanks to a combination of Hash-table degeneracy into a list and predictable collisions. The central hypot...
After reading some excellent papers on SipHash, I understood that good non-cryptographic hashes such as MurmurHash and CityHash are not secure for Internet usage, due to a certain type of DDos attack becoming possible, thanks to a combination of Hash-table degeneracy into a list and predictable collisions. The central ...
I have a program which uses AES-256 in CBC mode to encrypt and decrypt files. As I have quickly realized, AES will even use an incorrect passphrase to decrypt data, which leaves me with no way to validate whether the passphrase was correct or not and, in turn, whether I'm decrypting things successfully. One idea which ...
While reading about a few cryptographic systems, I noticed that we always assume the communication channel is not secured. Why is this assumption made? And, why the effort is being put into designing cryptographic systems rather than working on making these communication channels more secure? I know the question is ba...