instruction
stringlengths
32
27.2k
I have to answer the following question for a homework assignment: You have a hash algorithm that converts a $2\cdot n$ bit number to an n bit number. How many hash values do you have to calculate to find a collision for $h(x) \oplus h(y) = h(r) \oplus h(s)$ I know that a you can find a collision after $2^{n/2}$ ...
I have been reading about SHA1 and SHA256 and how they actually hash a string of text to a unique hashed message. But what I dont understand is what makes them resistant to collisions. Whats the best way to find a hash collision? What makes a hash algorithm resistant to collisions? If we find 1 collision because it ha...
Assume my authentication system consists of querying an endpoint to get sign in parameters cost and salt, auth_hash. After receiving these parameters, I will use cost and salt to derive a 768 bit key using PBKDF2: key = pbkdf2(user_password, salt, cost, 768).hex I then split the key three ways: server_password = key....
Question Rephrased: Does randomisation of valid and invalid messages in a high volume channel add security? Scheme: valid messages are identified by a pre-shared random number sequence and noise- large volumes of random messages which can be encrypted by a large range of dummy keys- are ignored by the receiver but can ...
I am reading Schoof's 1995 paper, Counting points on elliptic curves over finite fields, page 236, Proposition 6.1(i). I am trying to understand page 238 (second paragraph) of the proof: if the conductor is $1$ then $j$ invariant is $0$, or $1728$. In Silverman's book, The Arithmetic of Elliptic Curves, Section III.10 ...
From what I could find it relates input differences to output differences usually across multiple rounds. But is it the entire probability distribution over all output differences for one input difference? Or is it the list of differences that produce the output difference with the highest probability? What is the exac...
As an extension to this quesiton, or this one how would you go about attacking a re used pad if the plaintext was randomized before being encrypted? 0 0 0 1... Plaintext 0 1 1 1 seed(truly random number) 0 1 0 1 Key1 0 0 1 0 seed + Key1 mod 2 (=Cipher1) 0 1 1 0... ...
In this paper (Provably Secure Password Authenticated Key Exchange Based on RLWE for the Post-Quantum World), author describe password authenticated key exchange scheme on page 9 and 10 (see Fig. 1 on page number 10). I have following doubts in my mind How initially new user starts communication with the ser...
I'm looking for a Key Derivation Function, kind of like PBKDF2 or Scrypt, but which can be computed by a machine you don't trust. Some way to give it a derivative of the source password, such that the key can be computed from the derivative but the derivative is opaque and otherwise useless to the untrusted machine. ...
What is the implication of not using the Lagrange multipliers in Shamir's secret sharing? I mean each update will be $Poly(x_i) \bmod p$ where $p$ is a prime number instead of the original one that is $(Poly(x_i)* LPC_i) \bmod p$. Assuming that the verifier has access to all secrets $x_i$s, it can re-do all the update...
Question Is it possible to create a public key encryption scheme, with $n$ parties, where a party can send all other parties a bit unique to each party in less than $n$ bits? Assume we can set up a PKI and there exists some public broadcast channel like a trusted forum or a personal webpage. All users including advers...
Is there a defined method to choose value of $t$ when using fuzzy extractor to reconcile two close secrets? I did try with multiple values ranging from 5 to close to half of the sequence. I understand it statistically depends on chance of error, difference between close sets.
SHA256 Free Start Self Collision (Full 64 rounds) IVec: 72BF9EF1 27B82DFB F298F3B7 22B6C32C 18A54860 4C032D91 ADD7B85B 7ED1A4AC Block: 0000004D 0000006F 00000075 00000073 00000065 00000054 00000072 00000061 00000070 00000000 00000000 00000000 00000000 00000080 00000000 000001B8 Output: 72BF9EF1 27B82DFB F298F3B7 22B6...
I want to know if a larger block size increase the security of the block cipher?
Essentially, I am trying to build up a list of authorised public keys that will be stored in a database P by a verifier V. A public key will be considered authorised if belongs to a user in a database of verified users D. The problem is that it should not be possible for the verifier to ever link a public key to a spec...
I have no background in cryptography so excuse me if this question is a little basic or poorly defined. I'm trying to build a circuit using microcontrollers that implements a hash function of some arbitrary number that a user inputs. I want to make it such that the person is able to select from a small list of hash fun...
I'm wondering whether such interesting symmetric-key encryption exists or not (from theoretical perspective): We encrypt a vector of messages $(m_1,m_2,\cdots,m_\ell)$ using the symmetric key $K$ to obtain a ciphertext $CT$. Then to decrypt the ciphertext, the decryption algorithm, using the same symmetric key $K$, tak...
I'm trying to solve a problem that goes as follow. There is a set of item and that set is very large. Several actors needs to exchange information about this set, such as adding and removing element from the set and querying if an element is in the set. These actors do not trust each others so they need solid proof. Be...
Is there an efficient algorithm for the tagging and location of information over an insecure channel, where two parties (the tagger and the intended recipient for the tag) can recognize a piece of information has been tagged, but it looks like random data to an outside observer? Preferably not something linear, maybe O...
From “Are common cryptographic hashes bijective when hashing a single block of the same size as the output” and “How is injective, inverse, surjective & oneway related to cryptography”, it is suggested that cryptographic hashes are surjective. For avoidance of doubt, surjective means this: whereby all the hash input...
Do “Shamir Secret Sharing” schemes have a limitation for the amount of data that can be split up between each share, or a maximum number of data that can be shared within one secret? I believe there is a relationship between the maximum data that can be shared the prime and the number of shares, or am I mistaken?
Say there's a cryptosystem where encryption and authentication of data is done using a key derived from a user-given password using something like PBKDF2. Is it a good or bad idea to include the PBKDF2 salt in the MAC? In other words, which of these two systems is better? $$Packet = Salt + IV + Enc(Data)$$ $$Output =...
Shor's algorithm has already been implemented to factor 15 into 3*5 on a simple quantum computer. Is technology to the point that we should consider RSA deprecated?
I'm implementing AES and I'm getting confused in the ShiftRows step. So far, my key expansion and SubBytes works and I get the same output as specified by the NIST publication. For the ShiftRows Steps, if we refer to the test vector below from NIST, the output is incorrect according to this: Round 1, from NIST page 3...
I know that Schnorr's signature is important since it is one of the most compact signature schemes whose security has been proved in the random oracle model. Now, I want to know if such proof is easy and someone could explain it to me, or maybe just point out the main steps of the proof. For the sake of clarity, the S...
Hello, as a non-professional (at all) but a fan of cryptography, I have one idea and I would love to hear your input on it. As I understand cryptographic functions they should have following attributes: from private to public part - fast and easy from public to private - hard Ok, thats the basis premises I will try ...
I will approach the question from practical side. All the examples are not real, but for illustration purpose only. I have a message, the secret Bitcoin key, which I want to store safely. MESSAGE = KwjwmREseNZmZ8yeNKrurN6qPuh9FhrLAefYa2nTLafLkGmWW9ta To do this I come up with 4 keys which look independent, somewhat p...
I want to know if we use function H as random oracle in RSA Blind Signature and assume that RSA Assumption is correct, is it true that the RSA blind signature schema is secure?(i.e. There isn't any adversary who can create a valid signature on a message that he doesn't queried to signer oracle). Intuitively, I think th...
I am newbie to CBC crypto: When I try decrypt the cipher text to recover the plain text, things are not going smoothly as I face some issues in the decryption process with padding and not obtaining the plain text finally. So I would like to know about why padding is used in this CBC method? Why is it not used in the EC...
I have a source with a very low entropy (like 3 entropy bits per 1024 source bits). But I need to construct a 128 bit seed from the source. Will it be helpful to XOR 350 bits with jump 128 bits, e.g. $n_0\oplus n_{128}\oplus\dots\oplus n_{128*350}$ or maybe some more times? EDIT: The source is SRAM so the bits are fai...
I am a bit stuck on the following claim: The ElGamal commitment scheme is information theoretically binding As far as I understand, an adversary $A$ would win the binding game if it is able to find an $x\prime\neq x$ such that $C(x)=C(x\prime)$. $C(x)=C(x\prime)$ implies: $$ (g^r,h^rx)=(g^{r\prime},h^{r\prime}x\prime...
If you have a symmetric-key algorithm that is limited to using a small key size (say 40-bits) is there any way you could increase the resistance to brute force attacks without increasing the key size? I am interested in approaches that increase the ciphertext message size (such as padding of some form, or a method tha...
Given a 128-bit key used for authentication based on AES-CMAC, the NIST 800-38B recommendations suggest at least two criteria for a good key cryptoperiod: after 'MaxInvalids' error messages the key should be retired (considering the MAC truncation and the accepted Risk in appendix A); the key should be changed to limi...
This was originally posed as this question: "Does randomisation of valid and dummy messages in a high volume channel add security?" But due to the reformulation based on answers provided, Tylo (https://crypto.stackexchange.com/users/4082/tylo) suggested it be posed as a new question. Note that this question is possibly...
I can't imagine one that is not polylogarithmic but logarithmic. $O(\log N)$ satisfies both. What about $O(\log^{3}N)$, $O(\log^{100}N)$, and $O(\log^{10000}N)$ ? Let's say $N=10^{10}$
I want use CBC mode for sending and receiving files (avi, mp3, docx, jpeg) max up to 20mb. But also I want cut this file after encryption on sending site for example on 2mb size and send each file separately to receiver and on his site i will again join all 10 files together to one and then decrypt it. Is CBC good mode...
I'm working with Arduino and hash-based signatures which are signature schemes that use only hash functions. Due to the constraints of an Arduino I was thinking about using SHA1 as the underlying function of my hash-based signature. But I'm not sure if it still makes sense to use SHA1 due to its vulnerabilities. Is the...
I'm working on a project with a scheme in which c[i] = AES-CBC-Encrypt(msg_key[i], IV, msg[i]), and two distinct plaintexts never have identical keys. IV is a string of nulls. Random IVs are not an option because fully deterministic behavior is essential in this application. The only available sources of entropy (passp...
I read on Wikipedia: [...] pairings have also been used to construct many cryptographic systems for which no other efficient implementation is known, such as identity based encryption or attribute based encryption schemes. Is this still the truth? I cannot find any newer sources for this. Is someone up-to-date on th...
Is there any standard or accepted one way function that does not produce collisions? I'm not looking for hash functions. Does that make sense at all? for example given string with length n, the function will always output same obfuscated string that is not possible to reverse engineer. something that is mathematically...
I realise that elliptical curves are tricky, but there's one aspect that no one seems to explain. I've looked, and it's towards the beginning. This is the traverse over a red curve:- This is only three steps (n=3). For cryptography n must be large. I don't know how large but I cannot believe that all tangential and ...
I do have a secret generation source with very low bit rate. In order to guarantee secrecy I need to wait till I have say 128 samples. How do I justify regarding brute force breaking in for $N$ bit sequence where $N<128$? How do we do such calculations for state of art computation targeted to different classes of devic...
How long would it take to crack a AES-128 key using the most advanced technology currently available? The hardware can be anything, be it a high-performance CPU, GPU or even FPGA?
I was looking at a way for modular exponentiation $X=A^e \mod{n}$ with negative base $A$ in order to evaluate how it needs to be changed so I can use it with my hardware acceleration unit. The crypto library I was looking at deals with negative base $A$ (MPI) as follows: Check if A was negative and if it was, remember...
I know that symmetric cryptography is faster than asymmetric, but on average how much faster would it be if you were encrypting and decrypting a 2MB file?
I was answering this question Computing Logarithm using homomorphic encryption and I came up with a solution if you had encryptions of the bits of the number that you wanted to take the log of. But in that situation all they have is a fully homomorphic encryption of the number itself. I was curious if there was a way ...
The answers to my previous question (How safe is XOR with multiple independent but non random keys?) revealed quite a few problems, to a degree that a new approach had to be developed. I took the recommendations of @Daffy and put together a MessageSafe product, which I need your comments about the degree of its secur...
[Disclaimer: I am fully aware PKCSv1.5 is horrible and should die (though tell that to the TLS v1.2 specification). I am asking this question for my own edification.] PKCSv1.5 encryption padding (as seen for instance in RFC 3447) formats the RSA message representative as EM = 0x00 || 0x02 || PS || 0x00 || M Where PS is...
Chaffing and winnowing is presented as a form of confidentiality without using encryption. This is beneficial for countries where encryption is regulated. Below is a diagram from Wikipedia showing Alice sending "1001" to Bob. My question is what is the purpose of Charles in this picture? Why can't Alice just chaff th...
Let's say I have a simple "vault" application where users can enter data and a passphrase, and it will be encrypted, requiring them to re-enter the passphrase to decrypt it. This would be implemented as follows: generate salt for key generation generate key from (salt, passphrase) with argon2, scrypt, or whatever else...
Objective: To have a very simple to verify, but very secure small message encryption. Idea: Message ⊕ bcrypt( Password). We remove password biases with bcrypt and then XOR resulting key with the Message. Implementation. Limitation: Only messages up to 320 characters long are supported. 10 bcrypt salt values are har...
Consider the Shamir Secret Sharing scheme based on polynomial interpolation. In this scheme, every part has the same right: one piece of information of same value as the other ones. The idea is to adapt this scheme in following way: Suppose that we want to share a secret among politicians and generals. The secret can o...
I am learning for the exam in cryptography and I have found an assignment about the common protocol failure in RSA. Assignment: Suppose Bob uses an RSA cryptosystem with modulus $n$ and encryption exponent $e_1$, and Charlie uses an RSA cryptosystem with the same modulus n and encryption exponent $e_2$ , where the...
I am using Ben Lynn's libpbc to implement a BLS threshold signature scheme and I am aiming for 128-bit security (i.e., a forgery attack should take around $2^{128}$ tries). I was wondering what curves in libpbc would provide this level of security? There are some indications about discrete log security here but I'm not...
We have a trusted application that observes sensitive identifiers, e.g. credit card numbers. We want to send data associated with these identifiers to an untrusted analytics service that will occasionally generate and send alerts back to the trusted application. We've considered storing a table mapping sensitive identi...
Here's a sample ECDSA private key (I don't use it for anything): -----BEGIN EC PRIVATE KEY----- MHQCAQEEIFL3sLnioGcDvHWM/BPlNw96BOx1KKco2qsq4UwhQUosoAcGBSuBBAAK oUQDQgAEXs1Fmq4QdPAbn3NycdEU+HOjc3kW9efbso2kI/vdDTWcSCMk310s53G3 tRClDBPPuuJAsKghbPfaTaUpmXFCNA== -----END EC PRIVATE KEY----- Here's what OpenSSL's asn1parse...
Given $m_1, m_2$ such that $MAC_k(m_1) = MAC_k(m_2)$ is it possible to construct more collisions with pairs of the form $m_1|x, m_2|x$? Here is the CMAC picture from Wikipedia where it is only part of the one-key MAC article: I don't see how it could be because it treats the last block of the message differently but t...
After reading the Specification of the 3GPP Confidentiality and Integrity Algorithms 128-EEA3 & 128-EIA3. Document 2: ZUC Specification, I just cannot figure out why does zuc need an initial vector, my current understanding is that the initial key and the initial vector are playing the same role in ZUC, is there anythi...
I am trying to sign an ECDH public key with ECDSA. However, my hardware does not allow me to implement a hash algorithm, considering I am running out of memory already. Therefore, I am currently just passing the ECDH public key as the message to be signed to the sign function without any hashing beforehand, which is us...
I want ask you how important is to have complicated personal password for AES-256 crypto? For example if I use these two "types" of passwords: pass123 Tre$%#CDS-98$$DWEsde985#@ then how different are these for helping protecting more my plaintext encrypted using AES-256? Is AES is using my letters from my personal ke...
Problem. I want a longer key out of password than my hashing function provide. Idea. I want to hash password multiple times rotating chars one position each time and use composite key. Question. Do I really weaken the password? Example: Password=carphagen Key1= BCrypt("carphagen")=OZrxJo..IAwipd8hHm69IGFiPz/Y/veK Ke...
I have a couple of Android devices which run my app. Every device has it's own unique serial number - a hex string 16 characters long. The app needs files, which usually reside on external SD. These files should be usable only by a device which they are intended for. So I need to encrypt these files, with a unique key...
I'm attempting to break a system which uses decryption code functionally equivalent to the following: $key = md5($somePassword) . foo($somePassword); for ($i = 0; $i < $payloadLength; $i++) { $data[$i] = (ord($data[$i]) - ord($key[$i]) % 256; } Where foo() is a bunch of nonsense pseudo-cryptographic logic involvin...
I recently answered no to Is there a floating point CSPRNG? Unpredictable rounding errors, especially across dissimilar hardware were my reasoning. In it's most basic form, a CSPRNG can be constructed by securely hashing a randomly initiated counter. This is what happens inside the secure random function for Java. So i...
In Shamir's secret sharing scheme, any combination of shares (that pass the threshold) will result in the secret being revealed. Is it possible to have a system where some combinations are invalid? For example, imagine a company's trade secret is split into 10 shares with a threshold of 3. You give 3 to the CEO, 2 to e...
In a recent answer to a question about CSPRNGs, it was stated that… Nondeterministic algorithms where there is no such requirement, and ideally could be replaced by a true random generator. Example: operating system random generators, where the practical solution has been to compose a deterministic pseudorandom gener...
I am started working in post quantum cryptography(lattice based cryptography) specifically in Password Authenticated Key Exchange (PAKE). I come across many PAKE key exchange scheme (like this one) that do not take in consideration the registration process and login process. These schemes simply assumes that two partie...
Is there a block cipher mode that does encryption and decryption without using the "key" input of the block cipher? I ask this because rekeying a block cipher can be an expensive process, and I intend to encrypt many blocks with many different keys. Is there some mode or construction that has the security of the underl...
Is it possible to have an encryption and decryption scheme so that decryption is a 2-party process? For instance, Alice sends an encrypted message to Bob along with the key for that message. Bob, by himself, cannot feasibly decrypt this message. However, with some interactive help from Alice, he can decrypt it. If Bob ...
I'll explain some extra steps I'd like add to the example given in this document, to further slow down each brute force key attempt, and then you guys can tell me why it wouldn't work. As an example, if I send you a eight-megabyte message encrypted in all-or-nothing CBC mode with a 40-bit DES key, the adversary mu...
Dan Boneh, Henry Corrigan-Gibbs, and Stuart Schechter have proposed Balloon Hashing: A Memory-Hard Function Providing Provable Protection Against Sequential Attacks (in proceedings of AsiaCrypt 2016). Taking the abstract at face value, it is a blow (pun intended) to Argon2, the winner of the (first) password hashing co...
Is it possible to hit point-at-infinity while performing scalar multiplication in Weierstrass curves? According to this reply this is only possible when the scalar k is bigger then the order of the curve n. Is it so? If yes why?
Consider the following (zero knowledge) protocol based on the hardness of finding square roots modulo $n$. The Prover states that he knows a square root $x$ modulo $n$ of $y$, i.e., $y = x^2 \pmod n$. The Prover randomly chooses $a \in \mathbb{Z_n^\times}$ and sends $r=a^2 \pmod n$ to the Verifier The Verifier randoml...
I'm confused about the definition of an interactive zero-knowledge proof (the simulator-transcript-thingy). Assume the following setup: $P$ and $V$ do a Diffie-Hellman key exchange to generate the shared secret S. They then both compute the hash $H(S)$. $P$ computes $\sigma = sig(sk, H(S))$ and sends $\sigma$ to $V$. ...
I am currently writing my masters thesis in which I need to develop a licensing module for an application. The license itself is a JSON Web Token which is signed using a RSA private key. Since we have the requirement that resellers should also be able to create and sign valid licenses I thought about using a PKI where...
I have a 16-byte ciphertext, 16-byte key, and 16-byte IV. The key and IV I was able to set myself, and all I know about the ciphertext is that when I decrypt it, it will be human-readable. I have tried PyCrypto and OpenSSL methods to decrypt the ciphertext with no luck. This is leading me to believe that it may be a cu...
I am trying to implement Coppersmith's attack to find small roots of an example bivariate polynomial. $f(x,y) = (8x+7)(8y+7) - N \pmod{8}$ In this example, the results should be $x = 2$ and $y = 8$ (obviously you could brute force it, but that's besides the point). For univariate polynomials, Coppersmith's attack is...
Which of these two methods suits better the implementation of a secure chat application? In this context, chat will be limited up to 150 letters for one message. I would prefer RSA because what I know RSA is really secure if it is used for small text and also if I will use groups it is easy in RSA because of public key...
I am trying to find out what the asymptotic computational complexity, in terms of big $O()$ notation, is for discrete log. Specifically, consider an element of the field $x \in \mathbb{F}_{q}$, what is: The worst case rigorously provable complexity of computing the discrete log of $x$ if a) $q$ is a prime or b) if ...
First of all, I would like to tell you guys that I'm a complete noob at cryptography in general, so please pardon any dumb stuff I may say. Well, I have used a lot of cryptography libraries in a couple projects I have done in the past. They usually work like this: Input: secure = cryptography('sensitive data', 'passwo...
I am trying to reverse this equation to find the encrypted number given to it. Here is the equation: $$y = x \oplus n \oplus (x \ggg 3) \oplus (x \lll 7) $$ $\oplus$ is the bitwise exclusive or function $a \lll b$ is $a$ bit rotated left by $b$ bits $a \ggg b$ is $a$ bit rotated right by $b$ bits $y$ is a known 32 bit...
Per SEC 2, the base point $G$ for secp192r1 is as follows: G = 04 188DA80E B03090F6 7CBF20EB 43A18800 F4FF0AFD 82FF1012 07192B95 FFC8DA78 631011ED 6B24CDD5 73F977A1 1E794811 According to this JavaScript ECDH Key Exchange Demo, when you click the secp192r1 button, the $(x, y)$ coordinates for $G$ are as follows: x = 6...
Cycle-walking is a technique for format-preserving encryption that involves repeating an encryption process until the result is inside a desired range. For example, given an input P, a range R, and an encryption function E. C := E(P) Is C in R? yes? Output C and quit no? C := E(C) Try again My question...
So I've come up with an (admittedly impractical) encryption method using a lookup table. The table is a shuffled list of all unsigned 32-bit integers, effectively making it a 32-bit unkeyed PRP. I have this in a 16 round Feistel network, bringing the block size up to 128 bits and adding a 128-bit key. Ignoring implemen...
I am writing an encryption program using C#. My goal is to secure files even if the computer is stolen and somehow logged into. Assumptions The code used to write the program is visible to a malicious user The password hash used in the program's login process is also visible Concerns I am using the same password to:...
Consider this random generator function. A simplified version is provided below (this is C++, mind that "seed" is a reference): uint32_t Rand(uint64_t& seed) { seed = 1683268614LL * (seed & 0xffffffff) + (seed >> 32); return seed & 0xffffffff; } For those unfamiliar with C++: & denotes bit-wise AND, LL as a su...
Here's the algorithm Wikipedia gives for double-and-add point multiplication: N ← P Q ← 0 for i from 0 to m do if d[i] = 1 then Q ← point_add(Q, N) N ← point_double(N) return Q $P$ is an $(x, y)$ coordinate and so it seems reasonable to assume that $0$ is a $(0, 0)$ coordinate but the...
I have this question: Given $G_1$, $G_2$ are PRG's. Is $H(s)=G_1(G_2(s))$ also a PRG? Thank you.
What is the most efficient way to prove that a person computed $r$ rounds of some cryptographic hash function (ex. SHA256) on an input? Specifically, I'm trying to optimize (1) the running time of the verifier and (2) the size of the proof (in that order). The trivial solution seems to be to show all $r$ hashes, where ...
How should I answer the following problem: Let $F = F0 \times F1$ be a pseudorandom generator with expansion factor $2n$ such that for all $x \in \{0, 1\}^n$ $$F(x) = (F_0 (x) || F_1 (x))$$ and $$|x| = |F_0 (x)| = |F_1(x)|.$$ Prove that $$F'(x) = (F_0 (F_0 (x)) || F_0 (F_1 (x)) || F_1 (F_0 (x)) || F_1 (...
I want to use ECC to encrypt audio. Is ECC encryption a stream cipher or block cipher? I'm encrypting one sample (1 byte) at a time and I want to use multi-layer encryption (multi-ECC) to increase complexity but this increases the run time. Should I use parallel computing to decrease the run time? Is that the right s...
Suppose $N=p^2rq$ where $p,r,q$ are primes and $r,q$ have equal bits with roughly $(\frac14-\epsilon)\log_2N$ bits while $p$ has roughly $(\frac14+\epsilon)\log_2N$ bits is there a special technique to factor this form of integers?
I am new to RSASSA-PSS Signature verification algorithm. Below are the test vectors from NIST but i am not able to understand each parameter. I could understand that SHA1 is used for Hashing and e stands for exponent but not other parameters? Also, Can someone pls provide link of NIST test vectors of RSASSA-PSS with 30...
Is there a good reason not to write encrypted data in-place? From the iOS 10 Security Guide:
I'm looking for some way to take a fixed length block cipher (for example AES) and turn it into a variable length one with comparable security. The new length may be bigger or smaller than the underlying block cipher's. I'm considering going about this with an unbalanced feistel network, but I'm asking if there's an al...
I was wondering why you need a certificate of the server at client side. Can't you just fetch it from the CA itself? I am using mbedtls to program some small client, and in all the client examples they use a certificate of the server. However, if you need to specify the server certificate to be able to make a connectio...
The algorithm Sieve of Erastosthenes uses memory to do its work. The available memory determines the highest prime number, which can be found. On a regular PC, we have typically 4 GBbyte memory, which allows to store 32*10^9 bits. Therefore the highest prime number to be found with Sieve of Erastosthenes is 32*10^9-1 w...
I have read a lot about the discrete logarithm problem of ecc, but I still do not understand the problem as follows: We have domain parameters: (p, E, P, n, h), where n is the order group of P. The process of creating privatekey - publickey is as follows: Select a random number k under [1, n - 1] Calculate Q = kP Retu...
I'm trying to understand DES and a bunch of other cryptographic systems using S-Boxes. I have now a quite basic question about how Sboxes work in general. For DES, Sboxes are substituting a 6-bits input for 4-bits output. It is clear for me how this works using the suitable substitution table. What I don't understand ...
Say I want generate pair of public/private keys. First of all lets choose two prime numbers $q = 17, p = 11$. Now, lets choose public key $e=7$ and try to determine the matching private key $d$: $$d\cdot e \mod (q-1)(p-1) = 1$$ $$d\cdot 7 \mod 16\cdot 10 = 1$$ $$7d \mod 160 = 1$$ So, there are many solutions for this...