instruction
stringlengths
32
27.2k
Am trying to understand Garbled Circuit based approach for Secure Two party Computation. There isn't much leakage in the classic millionaire's problem where the comparison circuit is used. But imagine they want to do some arithmetic operation (like addition or multiplication) without revealing their individual wealth....
As I understand it, AES in CBC mode does an XOR of the 128-bit initialization vector and the first 128 bits of plain text. Is this correct? I am using the PHP 5.3 openssl extension in aes-256-cbc mode. I'm experimenting with a round trip, that is, encrypting and then decrypting to make sure I get back the original stri...
I am not thinking only steganography in images, I think it is also possible to encode data for example into the length of spaces of a clear html text. I suspect, the steganography changes (elevates) the entropy of the non-significant part of the messages. But: How to detect in the general case, what is "non-significan...
I am considering a "secure function evaluation" problem: Consider two parties: A and B. A has a one-to-one mapping function $f(x)=k$. Basically, the function $f(x)$ can be regarded as a table of two columns. The first column is the domain of $x$ denoted as $D$. The second column is the range $K$. The party B has a sec...
The past week I've been looking into - and playing with - algorithms for factoring RSA moduli. From what I understand, it's important that the primes p and q are of the same magnitude as the square root of N, but they shouldn’t be too close. To find out how close p and q are to sqrt(N) in the real world, I've used Open...
Hash functions are often used in cryptographic schemes and protocols, and that doesn't necessarily mean that their proofs are on the Random Oracle model. That leads to the following question: What is the "turning point" in which the use of a hash function requires a proof on the Random Oracle model? Is it when the pro...
I am looking for CMS AuthEnvelopedData test vectors for AES-GCM mode. I haven’t seen any ready-to-use test vectors for it. There are test vectors for AES-GCM mode but not for its CMS support. I even checked open source cryptography libraries which implemented AES-GCM with CMS support (AuthEnvelopedData Content Type), b...
I'm using XTEA to encrypt passwords that I store in a database. (I need to be able to decrypt these passwords later to log in on another system.) But now I have noticed something: if I decrypt a password using a different key I can still see some of the patterns in the plain text. I am not worried about an attack again...
For example: p = 5, q = 11, n = 55 $\phi$(55) = 40 e = 3, $\phi$(55) and 3 are relatively prime m = 3, then: $3^3 mod(55) = 27$ m = 113, then: $113^3 mod(55) = 27$ I heard that e and $\phi$(n) have to be relatively prime in order for the encryption to give unique solutions, but it seems that even if they are, multiple ...
Conclusion from an EncFS audit: EncFS is probably safe as long as the adversary only gets one copy of the ciphertext and nothing more. EncFS is not safe if the adversary has the opportunity to see two or more snapshots of the ciphertext at different times. I don't quite understand this sentence: "to see t...
I want to know what the state of the art in the following cryptographic problem is. Assume a public channel on which encrypted messages are exchanged, using symmetric key encryption. I hold a couple of secret keys. For each ciphertext message on the shared channel, I need to determine if I can decrypt the ciphertext. ...
I'm reading Rafael Pass's lecture notes on one-way function and came across two definitions. The first one is: A function $f$ is one-way if $f$ can be computed in P.P.T. and there exists no non-uniform P.P.T. $A$ such that $\forall x \in \{0,1\}^*, Pr[A(f(x)) \in f^{-1}(f(x))]=1$ However this definition is considered...
I've started implementing PBKDF2 algorithm recently and since I'm new in crypto, I would like to ask if my implementation is good. I looked up some documentations and I tried to follow many of them and now I am really confused. Documentations I've followed: https://en.wikipedia.org/wiki/PBKDF2 https://en.wikipedia.org/...
I wonder: are there any real-world practical applications using the Paillier cryptosystem , as introduced in [1], or some derivations of it? I'm aware of quite a few schemes proposed in literature how to use it for voting, zero-knowledge proofs and such, and also of many prototypical implementations online, but I can't...
I need to generate unique (random) numbers that I can trace back to a unique source number. For example: source number A can generate numbers A1, A1, A3 .... Am source number B can generate numbers B1, B2, B3 .... Bm ... source number N can generate numbers N1, N2, N3 .... Nm All the source numbers A, B, .. N and gener...
Encryption scheme is called a permutation cipher if every plaintext string with letters $a_1,\ldots, a_n$ is encrypted as $a_{\pi(1)}, \ldots, a_{\pi(n)}$ for some (not necessarily uniform) permutation $\pi$. To break this cipher, one has to distinguish two messages based on their encryptions. I'm trying to solve this ...
Let's say $Alice$ needs to send ciphertext $c_b = enc(m_b,k_b)$ to $Bob$ and ciphertext $c_c = enc(m_c,k_c)$ to $Carol$. For both the ciphertexts notice that underlying plaintexts are different (i.e. $m_b, m_c$). Now imagine a single envelope needs to be sent to both $Bob$ and $Carol$ where both can decrypt and get the...
I am encrypting files in a two layered fashion as follows: Inner layer is 128 bit AES-CTR encryption Outer/Second layer is a simple one time padding with a particular key. While testing the running times I noticed that it takes same time to encrypt a 100kB file as it takes to encrypt a 10kB file. Logically it seems w...
The approximate Shortest Vector Problem (apprSVP) is a problem where, given the basis and the approximation factor $\gamma$ (a function of the dimension $n$), one must find a vector $v$ belonging to the lattice $L$ such that its norm is less than $\gamma$ times the length of the shortest vector in the lattice $L$. But ...
After having read the RFC 3610: Counter with CBC-MAC (CCM) and the Wikipedia article on CTR mode, I'm not sure how a nonce should be picked. The RFC says: A nonce N of 15-L octets. Within the scope of any encryption key K, the nonce value MUST be unique. That is, the set of nonce values used with any given key MUS...
All implementations of CMAC that I have found so far use a block cipher with the same key and block size. However, XTEA enciphers a 64 bit block by using a 128 bit key. If E_XTEA(key,block) is the encipher function and k is my main key, CMAC produces a temporary key k0 from an all-zero block: k0 = E_XTEA(k,0) CMAC der...
I hear it commonly said that the advantages of Symmetric encryption are speed and no limit to the amount of data that can be symmetrically encrypted. I also hear it commonly said that the advantages of Asymmetric encryption are security. But theoretically, if I want to symmetrically encrypt a 1TB file, my algorithm is ...
I note that Things that use Curve25519 provides a long list of protocols, software, and libraries that leverage curve25519, but I'm wondering if there is any such software that more fully implements a self-contained PKI ecosystem? For example, implementing the ability to generate a certificate and distribute it - perh...
Is there any tool which can be used to test that implementations follow FIPS 140-2 Compliance ?
I am new to crypto and wondered what would happen when we encrypt twice using any algorithm and the same key. Consider two block ciphers A and B. We generate the ciphertext as c = A(B(m)) for any message m. If they are in the same message space and they map to the same ciphertext space, why would using the same key on ...
Can file-versioning, which is available for instance in Dropdox, weaken the security of encrypted files if someone is able to see two or more snapshots of the ciphertext at different times? To be specific, the files are encrypted by PGP on the file level (each file, making extension: important.doc.pgp ) with asymmetric...
I'm new to cryptography. I want to ask about OTP-perfect secrecy diagram like figure below: On the overlapping region (middle), notated by R(X;Y;Z). R can be calculated by I(X;Y) - I(X;Y|Z). That region is symmetric in X, Y, Z and can be negative. For example when X and Y are independent bits, and Z = X xor Y, then ...
I'm working on a security application for RF modules aimed to protect a communication between an autarkic sensor and a line-powered receiver against MITM (man-in-the-middle attacks). I decided to use a communication approach based on a unilateral authentication using a 32-bit random as Nonce with time limited validatio...
The simple way to iterate a hash function $H(H(m))$ only makes brute force preimage finding slower, but leaves collision attacks as fast since a collision in the inner hash function is a collision in the overall function. Is there an iterative algorithm that also slows down brute force collision attacks? Without expand...
I'm currently implementing, with crypto++, and AES tranmsission system, whose key is based on a previous MasterSecret of 256 bits (which has been expanded using PBKDF2). This MasterSecret is then split into a key and an iv, to encrypt a message using AES-GCM. I must work with AES-256, so my key must be 256-bit long. Th...
For example, in Don Boneh et al.'s paper "Evaluating 2-DNF Formulas on Ciphertexts", they gave an encryption system that the cihpertext can be in either $G$ (when only additional homomorphic operations are evaluated on the ciphertext) or $G_1$ (when one multiplication applies). In such a setting, is it possible to let ...
The Secure Remote Password (SRP) protocol lets a client prove to a server that it knows a specific password without revealing that password to the server. The server stores a cryptographic verifier for the user account. If an attacker impersonates as the server it cannot learn the user's password. Now, does it also wo...
Consider we have a fixed value $x$. We pick values $ r_1,r_2,z\leftarrow \mathbb{F}_p$, where $p$ is a large prime number, and it is public. So $r_1,r_2,z$ are uniformly random values. We compute four values as below: $u_1=r_1\cdot x,\ \ w_1=r_1\cdot z$ $u_2=r_2\cdot x,\ \ w_2=r_2\cdot z$ Question: Do $u_1,u_2,w_1,w_...
The following encryption scheme: choose a random string $r \leftarrow \{0,1\}^n$ and compute the ciphertext $c= \thinspace <c_0, c_1>= \thinspace <r, F_k(r) \oplus m>$, assuming $F$ a PRF; is CPA-secure, as we have a randomized/non-deterministic encryption process. Why, if applying a modified encryption process, i.e. c...
Given a message $m$ that consists of several parts. we want to be able to verify individual parts or a combination thereof. The simplest solution is independently signing each part. But since asymmetric signatures are relatively expensive to compute and verify, that might not be the most efficient approach. Is there an...
I am thinking on a simple symmetric stream cipher. My first idea is the following: The key is a set of array of random bytes ($\underline{k}_1$ ... $\underline{k}_n$), whose length is $l_1$, $l_2$, ..., $l_n$ (any pair of $l_j$, $l_k$ is relative prime). We encrypt/decrypt the $i$-th byte of the stream by XOR-ring wit...
I looked everywhere on the web and I did find a lot of information about full disk encryption, but nothing really answered my question. When formatting a partition to use LUKS, the two most common ciphers are aes-xts-plain64 aes-cbc-essiv:sha256. Now I know that ESSIV is simply a way to prevent the watermarking attac...
We all know that MD5's collision resistance is severly broken. But when thinking of "random" strings with great cryptographic importance I've come up with NIST's curve seeds and MD5 collisions. But for this to really work out I'd need the most famous MD5 collision. So I'm asking: What is the most famous MD5 collision? ...
Assuming all messages and their signatures are available to the attacker, is it secure to use the same RSA private key to sign many messages (roughly $10^{6}$) via PKCS#11 CKM_SHA256_RSA_PKCS using a reasonably long (i.e. 2048 bit) key? For reference, CKM_SHA256_RSA_PKCS is described as follows: The PKCS #1 v1.5 RSA s...
When I read papers, I often see the comments, "order-preserving encryption is deterministic and it is not IND-CPA secure", or in general "it is not secure enough to be implemented in practice". So I am wondering if these comments are correct especially from the practical implementation's point of view. I know a lot of ...
I have quite a few WinRAR volumes that are all encrypted with the same password. The password is long and unbruteforceable, but I recently read that WinRAR uses PBDKF2 as its key-derivation function instead of generating a new volume key every time like TrueCrypt, which means that in essence all of these volumes have t...
Just started learning about Cryptography and Network Security in general, and I can't seem to grasp the understanding of the following question. Please correct me if I am misunderstanding anything. Imagine that there exists a Pseudorandom Generator that simply doubles all key length, G(n) = {0,1}^n -> {0,1}^2n. If I h...
Is it possible to implement any of the 5 modes of operation (ECB, CBC, OFB, CFB, CTR) with a hash function?
I am writing a mobile game and I need to save my game data on my game server, so crackers can not find and access the saved files(data) on their mobile. The game data can be expressed by numbers, so it does not really matters if I use Base64 as a means to securely pass the data via a network and/or to prevent data corr...
So let's say we use a cipher suite with DH key exchange and AES symmetric encryption. Alice and Bob both end up with the same shared secret key $k$. How is this value k used in e.g. AES? Will it be hashed before use, or is there a PBKDF involved? And what do we do about small $k$ (e.g. $10, …$)
We've constructed a new private RSA key from two known private RSA keys $Priv_1$ and $Priv_2$ as follows: $$p = next\underline{}prime\left(\frac{Priv_1(p) + Priv_2(p)}{2}\right)$$ and $$q = next\underline{}prime\left(\frac{Priv_1(q) + Priv_2(q)}{2}\right)$$ where $Priv_{1}(p)$ is the first factor of $Priv_1$ and so on....
Consider a practical scenario as described in Microsoft's Expand Export a Certificate with the Private Key. We can see a certificate with private key can be exported as a PKCS #12 file, where the private key can be protected by a password (in Step 7). Questions: If one day this PKCS #12 file is stolen by a hacker, th...
I want to de/encrypt several binary files rather frequently on a normally battery-powered device. My goal is to use AES-256 when the device is AC-powered and a highly performant algorithm when it's battery-powered to save power. I appreciate that the level of security will be compromised. Is there a performant algorit...
The book Cryptography Engineering by Fergusun, Schneier, Kohno section 2.7.1 explains Birthday Attacks: "In general, if an element can take on N different values, then you can expect the first collision after choosing about sqrt(N) random elements." This is an approximation. We are planning to upgrade the way we store ...
I find that for every 100 password salts in our database, we only average 94.73 distinct salt values (averaged over a total of around 18 million). Is there a way to take that observation and calculate the amount of effective entropy (or whatever is the correct term) we have in our salts? Clearly we need to improve how ...
While preparing for a crypto exam there is a task we don't really understand: task Let $E_K$ be a permutation $\{0,1\}^b \rightarrow \{0,1\}^b$ defined by a blockcipher with the key $K$. Let $M = (M_1,...,M_n) \in *(\{0,1\}^b)^n$ be an nb-bit message. We interpret the output of $E_K$ as an integer $E_K(\cdot) \in \math...
In what ways would you simplify? What would be changed to be more modern or extensible? Suppose you have no requirement to adapt to previous protocols. Links to proposed designs, existing protocols, as well as any ideas are welcome.
According to Wikipedia, a hash maps digital data of arbitrary size to digital data of fixed size. For all practical measures, a hash is a unique signature of a big chunk of data. But there is such a thing as a collision-free hash, I heard. Other than being able to decompress back, arguably the main difference between c...
When using advanced steganographic methods (like F5) what is the approximate maximum embedding rate when advanced Steganalysis (like a machine learning approach) can no longer reliably detect it? I have searched for papers dealing with this topic but have been unable to find any. Does anyone here know anything about t...
In the full-length proof of PAK scheme, the authors made extensive use of random oracles to extract (guessed) password from the messages generated by the real world adversary for the ideal world simulator. Questions: Are all the random oracle calls $H_i(\cdots)$ in the real world protocol (even called by honest users)...
Suppose we use an LFSR, which gives output $x_1x_2x_3\dots$ from some particular initial state. From another state, different from the previous one, using the same LFSR though, it gives sequence $y_1y_2y_3\dots$ Intuitively, some $i$ inequality must be true for $x_i\neq y_i$, but "intuitively" isn't exactly convincing,...
Assume we have a Baretto Naehrig curve over $GF(p)$ and a field extension $GF(p^{12})$ given by a minimum polynomial. Let $G \in GF(p)$ and $Q \in GF(p^{12})$ from the trace 0 subgroup. Do then the Reduced Tate and Ate pairings produce the same values?
The IND-CPA game has two challenge-response phases A key is generated by running $Gen(1^n)$ and challenger selects a bit b {0,1} uniformly at random. Adversary gets input $1^n$. Can query the oracle a polynomial number of times with messages and gets $E_k(m)$ back. Attacker sends messages $m_0$, $m_1$, challenger retu...
I wonder if ChaCha20 alone is sufficient for securing files stored on a disk or should Poly1305 should be used along with it? AFAIK, Poly1305 is used to secure the authentication channel, but for securing data-at-rest, the key can be read from the OS's keystore, which (typically) is fairly secure - correct? If so, does...
For the byte substitution layer in AES how do we determine B(i)? I follow how to use the multiplicative inverse table and using that to get B`(i), but how do I actually calculate the affine mapping? Is this normal matrix multiplication?
Suppose I have a private matrix $A$ that I want to conceal. I do the matrix multiplication $A^\prime =AK$ and $A^\prime$ is public. How can I quantitatively measure "how well" the matrix $A$ is concealed? To be specific, I may select different matrices $K$ and want to analyze the different protection levels provided ...
I'm trying to find a Zero-Knowledge proof of subgraph isomorphism in the following scenario: Alice and Bob both know about graphs G1 and G2. Alice knows about a subgraph of G1 which is isomorphic to G2. How can Alice convince Bob that she knows of this subgraph existing without giving Bob any help with finding the subg...
I'm working on a product with strong security. Essentially there is an App, downloaded from the iTunes App Store. When the App starts up, it generates a strong RSA keypair and stores it in the Keychain. This key pair is the foundation for a lot of things in the overall system. The next step is for the App to use this k...
From Wikipedia(https://en.wikipedia.org/wiki/RSA_%28cryptosystem%29#Proofs_of_correctness): $m^{ed}$ ≡ $m$ $\pmod{q}$ $m^{ed}$ ≡ $m$ $\pmod{p}$ then $m^{ed}$ ≡ $m$ $\pmod{pq}$ Question: if $m^{ed}$ ≡ $m$ $\pmod{q}$,then $q$|$m^{ed}$- $m$ if $m^{ed}$ ≡ $m$ $\pmod{p}$,then $p$|$m^{ed}$- $m$ that is to say, $m^{ed}$- $...
The question is whether the following simple key agreement protocol design has good security properties, and how it can or should be improved. Assumptions Alice is a persistent entity with a static and well-known public key. Bob is a transient anonymous party who would like to exchange some private information with Al...
The title is pretty descriptive of my question. As an example, say I use the MD5 hash function to create a hash key of the word "hello": 5d41402abc4b2a76b9719d911017c592. There are two questions I would like to have answered: How difficult would it be to calculate any new string that would hash to the same key as "hel...
I note that libsodium provides AEAD when using symmetric cryptography. And yet, under section 8 (Public-key cryptography) there are no public-key methods described which allow for additional data (AD) to be included. Keeping in mind cryptographic best practices, is there an elegant way to essentially add the feature of...
I am using curve25519xsalsa20poly1305/fn.seal from sodiumoxide crate written in Rust language which is a wrapper over libsodium c library and that function calls crypto_box_curve25519xsalsa20poly1305 in libsodium library. The rust code would look something like this: let (pub_key, sec_key) = ::sodiumoxide::crypto::box...
EDIT: The model I'm trying to make is "Enigma 1". I learned initially about it from a book called "Code Book" and then looked at it in detail from its wikipedia page. The site wont allow me too add more links but google "enigma rotor details" and see the wikipedia page There is a similarly worded question here but it d...
I'm working on my miner for my "game" site that's basically a pre-image attack from a hash posted online. You submit a hash input, it's hashed, and your score is the hamming distance (the number of bits that differ) between the two values. If it matters, I'm using Skein-1024 v1.3 My miner up until now has been incremen...
Are there any algorithms/protocols that let you produce a specific length of random tokens/bits in such a way that you can cryptographically determine which 2 or more tokens/bitstrings where produced using the same seed/key. Is it possible at all? For example, if I produce these random bits: 12432, 15693, with key A a...
I want to generate a small 30 or 32 bit PRP. I am going to use that PRP in an open web service and anyone will be able to get any number of plaintext-cyphertext pairs. I've found an algorithm called FastPRP and the problem statement fits my requirements perfectly. However the performance seems quite low for 30-32 bit r...
If the digital signature in ECC (ECDSA) is made using a private key, why is the OpenSSL library using ECKEY pair as an input parameter instead of the private key only ?
How much can I shorten a password hash before it begins to impact security? Suppose that I use PBKDF2 (correctly salted) with HMAC-SHA256 as the PRF. From what I've seen, it's typical to use 256 bits of output, since that matches what comes out of the PRF. My intuition suggests that there would be no security impact i...
My apologies, I'm quite new to cryptography. If we relax the definition of perfect secrecy such that for cyphertext $c$, messages $m_0$ and $m_1$, and constant $E$: $P[c|m_0] \le E * P[c|m_1]$ Using this, Can I prove a lower bound on the size of the key space as a function of the size of the message space? I don't...
I am building an iOS app that allows the user to sign a document served to them by a web server. So that page of the app simply has a document in the top pane, and at the bottom pane, a place to sign with your finger. So, I want to use DSA to allow this app to sign that doc and have the non-repudiation property. But a ...
I am very new to Crypto and need some clarification or input. The question is: Suppose that Alice wants to encrypt a message for Bob, where the message consists of three plaintext blocks, $P_0$, $P_1$, and $P_2$ - Alice and Bob have access to a hash function and a shared symmetric key $K$, but no cipher is available....
I see that KDFs should be used in systems that rely on PSKs, but what practical benefit does it provide? For instance, suppose the system relies on a shared secret for AES encryption and decryption. If the en/decryption uses a key derived from a KDF, an attacker could still sniff the key and decrypt the file. Yes, the...
I'm a bit confused after reading several articles that seem to provide conflicting information. Basically I was wondering if AES by itself can be used as an FPE? And if so is this something computationally prohibitive, or something reasonable to do. Furthermore how can we use AES by itself + cycle walking? Accordin...
Given input string S, and transformation (i.e. computer program) T, is it possible to provide a succinct proof that another binary string S' is identical to the output T(S)? By "succinct", I basically mean significantly less computationally intensive than repeating the original transformation. Also, I am ok with limit...
Let $E(p)$ be a Barretto-Naehrig elliptic curve with r-torsion and embedding degree 12 and $E'$ a sextic twist with homomorphism $\psi$. How to show, that $E'$ has a unique r-torsion group $\psi$ maps the r-torsion of $E'$ to the Trace-0 subgroup of $E(p^{12})$
Elliptic curve point addition and point doubling operations using Projective and Jacobian coordinates require fewer field multiplication operations when considering $Z$ coordinates of input points equal to one ($Z_1=Z_2=1$). Is there any drawback of this strategy?
I very well understand the DH key exchange. But what is the public key and private key at the end of the exchange. For example: Alice and Bob agree to use a modulus $p = 23$ and base $g = 5$ (which is a primitive root modulo $23$). Alice chooses a secret integer $a = 6$, then sends Bob $A = g^a \bmod p = 5^6 \bmod 23 =...
There seems to be a distinct lack of implementations of RSA signatures using OAEP to pad the digest. Other than the old, funky, padding schemes, it's PSS all the way. PSS seems to have the whiff of patents about it. OAEP, on the other hand, is accompanied by long diversions about its theoretical safety presented as cla...
I'm currently trying to understand all the differences between homomorphic encryption and garbeled circuits. As I understood the use of homomorphic encryption hides either the data or the computation from the computational party, but what about the circuit? Is only the data hidden with homomorphic encryption?
Why q-ary lattices are used to most cryptosystems rather than lattices. In most of the papers q-ary lattices are used. Is there any advantage? and Given $$B=(v_1,v_2,v_3,.....v_n)$$ is the basis, lattice generated by B $$ L(B)=\{a_1v_1 + ........ + a_nv_n\ |\ a_1........,a_n ∈ Z\}$$ Fix q and given a...
Kerckhoffs's principle is named after a publication over 130 years old. Yet it is still something that is commonly misunderstood and challenged by newcomers to cryptography. This question from Open Source Stack Exchange seems typical, and one answer to it implies that at some point, cryptographers in general "got it" a...
Suppose two agents A and B share a common secret and A makes a regular unique 16-byte announcement to B every 10mins which B must verify authenticity. I'm thinking of letting the first 8 bytes be the message and the last 8 bytes be the HMAC(key, msg). The message itself contains an increasing counter, which B uses to r...
I am trying to find a collision with the Bobcat hash of the 48-bit hash. I am a beginner coder so please point out any flaws in my modification of the bobcat program. It does find a truncated 12-bit collision of the first 12 bits. Now it has been running for 2 days trying to find a 48-bit collision with no avail. I a...
I need to implement the Fujisaki-Okamoto commitment scheme for a project such that I can demonstrate performance of various zero-knowledge proofs in relation to one another, for example Boudot's "proof that a committed number belongs to an interval" (see §3.1 if you are interested in what this entails, though it is not...
I am using 32 byte EC private keys on the client side of a web application. These keys should be securely stored on a server database. The keys should be encrypted (AES) before being sent to the server in javascript. The ciphertext will be given to the client when they have been authenticated with their login credentia...
Is there any reasonable ASN.1 standard to encode symmetric keys? I found PSKC, but it seems extremely heavy, and I can't quite find any library (e.g. bouncycastle) that would simplify using it. If all I need is to encode a symmetric key, would it be sufficient to just include: algorithm ID block size key size key bits...
If we only know the period of a Stream Cipher, let's say 150-200 bit in length, how can we use this information to attack a stream cipher? Taking a look at this link, What is the period of a cipher? I see that the period of the stream cipher is simply the amount of data we encrypt before starting the encryption over a...
For an assignment question, I am trying to prove formally that double encryption with two keys by the shift-cipher encryption function results in a shift cipher as well. If the Shift-cipher encryption function is defined as: $E_K(M)= (M + K) mod 26$ and suppose that we let $M = (x_1, ... , x_{m-1}, x_m)$ = an arbitrar...
DES keys are traditionally stored as 8-byte blobs, with only the high 7 bits of each byte being meaningful to the algorithm; the low bit of each byte is set so that the population count of the byte is odd. This makes DES have a key size of 56 bits, rather than 64 bits. Is there a standard format for storing a 56-bit r...
I'm thinking to sign a message using a key that is made up of a publicly shared key and a privately shared key. The operation for mixing the two keys could be concatenation, if it suffices. To formalise it a bit, the signature is essentially $$MD5(msg, concat(pub, priv))$$ Since the entire key isn't (completely) know...
My question relates to the station-to-station protocol as described in https://en.wikipedia.org/wiki/Station-to-Station_protocol [1] and http://cacr.uwaterloo.ca/hac/ [2] p 519. (1) Alice → Bob : gx (2) Alice ← Bob : gy, EK(SB(gy, gx)) (3) Alice → Bob : EK(SA(gx, gy)) I fail to understand the reasons behind why Bob si...
I need a cryptographic scheme to generate a deterministic chain of private keys that look random to outside observer but can always be reconstructed from a single root key, also: Neither private keys nor their corresponding public keys should contain any information about each other. In case of some private key leak...
I'm tring to choose an way for an Encryption mothod for my research? So,I want to choose one-layer encryption or multilayer encryption,and I want it to be easy to applicable. when I search about it, I found Homomorphic and linear programing that used for encryption. But still I could not find an way that never used for...
Wikipedia says sha1 produces a 160-bit (20-byte) hash value. So if I compute the SHA-1 of all possible SHA-1 values, which as far as I understand is at current time impossible both to calculate and store, will I get all possible SHA-1 values? Would I be able to collide anything?