Questions tagged [algorithm-design]

Design of cryptographic primitives (algorithms), like block ciphers, stream ciphers, random-number generators, hash functions, MACs, key exchanges, public-key encryption or signature schemes. Also tag with the relevant type of primitive. If you ask about a known existing algorithm, also tag with its name.

Filter by
Sorted by
Tagged with
0
votes
0answers
7 views

How to securely design REST API for Password Manager app? [migrated]

I want to create Password Manager where users can create their accounts and store website passwords. For the frontend, it will be a mobile app, but I need REST API as the backend data where the data ...
0
votes
0answers
19 views

How does APE: Authenticated Permutation-Based Encryption work?

I am trying to understand the encryption and decryption process of the APE: APE: Authenticated Permutation-Based Encryption for Lightweight Cryptography Full paper The Encryption what is exactly the <...
0
votes
1answer
46 views

Given a set of numbers which return a response code, how can I find the algorithm used to produce the response?

I'm working on a problem where I provide an 8 digit integer and a 16 digit integer, then a 10 digit integer response is produced. For example 12345678 and ...
0
votes
0answers
20 views

how to implement the modulus 2^64 in c for linear congruential generator LCG [migrated]

This is an implementation in C for linear congruential generator that has this formula: $$ X_{n+1}=a*X_{n} \bmod m $$ Below are two versions of the linear congruential generator function, the first ...
0
votes
1answer
43 views

Security of a cipher with some imperfection in round function

I got specific problem with round function in my symmetric cipher. It works on $128$-bit blocks. Every round got two $128$-bit keys. Block is xored with $k_{1}$ on the beggining of the round. Then it ...
1
vote
1answer
53 views

When attacking keyed algorithms, how is it known when the output is correct?

I've been reading a little bit about cryptanalysis, and I'm wondering how attacking algorithms that work on keys is performed. It's obvious how algorithms like MD5 are attacked, in pseudocode: ...
2
votes
1answer
59 views

Complexity of Gaussian Elimination over a Finite Field

I read somewhere that the complexity of solving a Linear $n\times n$ system over a Finite Field $\Bbb F_q$ using Gaussian Elimination is $\mathcal{O}(n^3)$ operations in $\Bbb F_q$. What's the role of ...
1
vote
0answers
36 views

Looking for an algorithm to encrypt with a single key and decrypt with a lot of keys without consuming too much space

Is it possible to have an encryption scheme that could be encrypted with a particular key, then decrypted with a large amount of keys without massively inflating the size of the final result? I am ...
0
votes
1answer
67 views

Can the EdDSA signature scheme be customized with OpenSSL?

EdDSA has currently 2 signature scheme Ed25519 and Ed448 where Ed25519 is the EdDSA signature scheme using SHA-512 (SHA-2) and Curve25519 Ed448 is the EdDSA signature scheme using SHAKE256 (SHA-3) ...
1
vote
0answers
78 views

Anamorphic Cryptography, what do you think about it? [closed]

I'm currently working on a personal project using a special kind of crypto I've imagined (noooo please don't !!!), called the Anamorphic Cryptography. The project: create a complete keyless ...
1
vote
1answer
55 views

What papers describe the rationale behind cryptography algorithms

I am trying to introduce myself to cryptographic hashing and encryption. I am looking for original papers of sorts, to describe the inspiration behind why they choose certain numbers, if they are ...
2
votes
1answer
115 views

Montgomery Multiplication with CRT

I am attempting to understand how to use Montgomery multiplication in an RSA private key operation: $X \equiv a^{e} \pmod{n}$ where $a$ is the message, $e$ is the exponent, $n$ is the modulus. Using ...
4
votes
2answers
130 views

What's the name of this random number generation algorithm?

I'm looking for the name of an RNG method or algorithm, described below. Combining multiple results of a non-uniform random number generator can produce a more uniform result. It seems like this would ...
0
votes
0answers
49 views

How to design number of rounds in my cipher?

I have specific cipher which is built from permutations. It has or should has few rounds. If we do 2 rounds it is like 2 permutation composition. 3 rounds are like composition of 3 permutations and so ...
2
votes
1answer
101 views

Cryptographic function that can 'pack' numbers

Is there a cryptographic algorithm that can 'pack' a bunch of strings/numbers and "confirm" if a string/numbers exists (later in the code) while keeping the output hidden? For example, I have ...
2
votes
0answers
72 views

How to construct a “toy” version of the Ascon permutation?

I want to obtain a “toy” version of the Ascon permutation defined for five 8-bit words (instead of five 64-bit words.) It seems that it is possible to use the same bit-sliced 5-bit S-Box. But is it ...
0
votes
0answers
30 views

Are there popular and secure Authenticated Encryption schemes with Salsa20/Sosemanuk in CTR-mode with a Carter-Wegman MAC?

I read that AES/GCM is a good choice for authenticated encryption because: AES has very strong heuristic security Encrypt-then-MAC leaks no information about the plaintext The CW-MAC in GCM can be ...
1
vote
0answers
38 views

Help on validation code algorithm [closed]

I wonder if someone can help me find the algorithm used to generate validation codes from a serial number. I already have some working examples of serials->codes pairs: 19003148 -> 523254 19003162 -...
1
vote
1answer
118 views

Error correcting codes that are indistinguishable from random

Suppose you have a public program P(n) which takes message n and generates an encrypted output (utilizing asymmetric cryptography) for some entity which has the private key to decrypt it. Using a ...
0
votes
0answers
35 views

Approach used with XOR cipher in black box scenery

What's the approach used in cryptanalysis to make an decrypter for a simple xor stream cipher in a Black Box scenery with only the output?
0
votes
0answers
27 views

How to determine the maximum number of times the DES algorithm needs to be run?

I am only a beginner in cryptography and I am getting confused by the following: Question Consider a known-plaintext attack performed on a double-DES cryptosystem. (a) Determine the maximum number ...
4
votes
1answer
51 views

Multiparty dataset intersection count

Typically, Private Set Intersection (PSI) protocols let you learn the subset of items on each party's dataset that are in the intersection. The problem in this case is a relaxation of these kind of ...
1
vote
1answer
75 views

How to calculate RSA Key Size correctly starting from 384 bits to 15360 bits or beyond 15360 bits

Hello fellow experts here, I am new to cryptography. Recently I looked into RSA Key Size (Microsoft RSA library), it actually describes that the minimal key length required is 384 bits and maximum ...
0
votes
0answers
35 views

How to calculate degree of confusion of an encryption algorithm?

I am programming an encryption-decryption model in python 3. I want to check its strength. I found 3 methods to check, they are: 1. Degree of diffusion 2. Degree of confusion 3. Integrity check For ...
1
vote
1answer
32 views

Can MFA codes be predicted if you know what their values were at a previous time?

I use an app on my phone that, after scanning a QR code on a website, gives me 6-digit codes which change every 30 seconds. These codes can be used for Multi-Factor Authentication (MFA) on some ...
1
vote
1answer
58 views

easy hash algorithm to use without computer [duplicate]

I am searching for a simple hash algorithm(s) which can be used to calculate relatively secure hash without using of any computer. Some requirements: use only simple arithmetics operations (+ - / *, ...
0
votes
0answers
20 views

Finding the relationship between generating elements represented by a Hamiltonian cycle of a Cayley graph (like in strong RSA condition)

Consider an undirected Cayley graph of a finite group $\mathbb{Z}_p \times \mathbb{Z}_q$, where $p$ and $q$ are distinct primes. Let the generating set for the Cayley graph be $S=\{g_p, g_q\}$, where $...
0
votes
0answers
42 views

How could I verify that a contract was actually sent to me from the client as soon as the contract is received?

with the information provided - what would be the best solution - something like document management program like IBM Filenet ? or trusted timestamping? If I want to store electronic contracts for ...
0
votes
0answers
18 views

How to disperse personal data before returning?

I am working on a project that is dealing with personal data. The task is to find a method such that when user makes a query into multiple institutions, the result will contain already scattered/...
0
votes
0answers
40 views

WPA/WPA password algorithm

I would like to understand the mechanism behind wpa/wpa2 algorithm. Is there any script that can put this theory:(Key = PBKDF2(HMAC−SHA1, passphrase, ssid, 4096, 256)) into action to test it ? I made ...
1
vote
1answer
59 views

What are the standard properties of an S-Box [duplicate]

Apart form the following, what are the other properties of a good cryptographic Substitution box or the S-Box: Changing one input bit should change about half of the output bits. Each output bit ...
1
vote
0answers
23 views

How does one ensure that a handshake protocol is secure assuming all underlying cryptography used are secure

Suppose one have to design handshake protocol using known secure cryptographic algorithm. The designer of implementer can assume that crypotography is secure but how would they ensure protocol itself ...
0
votes
1answer
44 views

How can I get VMAC Code in pure c?

I had find a paper about VMAC algorithm:VMAC: Message Authentication Code using Universal Hashing. Now I want to implement this algorithm, But i don't find test vectors about it. Who can give some ...
0
votes
1answer
61 views

How modern messengers encryption keys can't be hacked [closed]

I dont know is this question more like reverse-engineering or cryptographic. Why governments are hunting for encryptions keys? Aren't they delievering by the network the same as the encypted messages? ...
4
votes
1answer
335 views

I'm trying to understand which cryptographic algorithm is this

I'm reversing a cryptographic algorithm. This is part of the encryption function translated to python (starting from assembly code): ...
2
votes
1answer
82 views

Is there a term for cryptographic attacks where you can verify decryption without assuming any known structure on the plaintext?

The questions https://security.stackexchange.com/questions/1696/if-someone-breaks-encryption-how-do-they-know-theyre-successful and https://security.stackexchange.com/questions/119887/how-to-know-if-a-...
0
votes
0answers
67 views

What is meant by the duality and homomorphism of an encryption algorithm?

I am new to the field of cryptography and security so spare me with this question. What is the general idea of duality and homomorphism of an encryption algorithm? And how one may prove those two ...
2
votes
1answer
68 views

How to generate a 16 X 8 perfectly nonlinear S-box

I want to generate a 16,8 perfectly nonlinear S-box for an encryption algorithm I am working on. I don't have a background in math, and I'm an undergrad, so a lot of the math involved is very ...
1
vote
1answer
66 views

Are PQ/Classical Hybrid Key Exchanges a reflection of how little we trust PQ cryptography primitives?

My students have asked me some questions about why there are standards being developed for hybrid public key systems with both a classical and a post-quantum component. Given that when elliptic ...
0
votes
1answer
35 views

With the random numbers generated, can I know which RNG seed was used?

My teacher challenged us to find out which seed was used to generate some random numbers. I would like to know if it is possible to decipher the seed using the generated numbers (break the linear ...
1
vote
1answer
97 views

Is it possible that a signing algorithm produces no output?

I am reading Vadim Lyubashevsky's paper on Lattice Signatures without Trapdoors and I came across a somehow counter-intuitive part where he defined an algorithm $\mathcal{A}$: $y\leftarrow D_\sigma^m$...
0
votes
2answers
150 views

Is there an efficient algorithm that allows to construct a cryptographically secure $n$-bit hash function based on two unkeyed $n$-bit permutations?

Let $f(x)$ and $g(x)$ denote two independent, “ideal”, unkeyed, public $n$-bit permutations (two publicly known bijective functions that produce $n$-bit outputs from $n$-bit inputs), where $n$ is an ...
1
vote
1answer
63 views

Are there any algorithms for which generating any zero-knowledge proofs is not practical?

It is related to my earlier question: Can zkSNARK or other zero-knowledge proofs be used to proof message authenticity without revealing private key? Are there any algorithms for which generating ...
1
vote
1answer
79 views

Can zkSNARK or other zero-knowledge proofs be used to proof message authenticity without revealing private key?

The situation: Alice and Bob are exchanging messages encrypted by some known asymmetric encryption protocol. All their encrypted messages, as well as public keys are intercepted by Charlie. Can ...
5
votes
2answers
181 views

Is the ChaCha20 block function reversible using known plaintext?

I've been recently implementing the chacha20 stream cipher with Poly1305. As the core operations which make up the Quarter Round of chacha20 (ARX - Addition Rotation Xor) are indeed reversible, does ...
1
vote
1answer
55 views

How to find a small generator with small inverse? Does it have negative impact to security? (for Schnorr subgroup of $\mathbb{Z}/P\mathbb{Z}$)

Given a prime $P$ with $$P= r \cdot q+1$$ with $q$ prime as well. I'm looking for a generator $g$ of the Schnorr subgroup with order $q$ which is small by value and has a inverse (to $\bmod P$) which ...
0
votes
1answer
77 views

Is there an efficient algorithm that allows to obtain a uniform distribution of all possible $4$-bit permutations from a single keyless $4$-bit S-Box?

Let $S$ denote a keyless permutation that operates on $4$-bit inputs and returns $4$-bit outputs (that is, $S$ is a $4$-bit S-Box). In this question, $x_0$ denotes an arbitrary bitstring that ends ...
0
votes
3answers
135 views

Why didn't people redesign the key scheduling algorithm of DES to use longer keys instead of using 3-DES?

To overcome short key length of DES, Triple DES was devised. What would go wrong or why didn't people redesign the key scheduling algorithm to use longer keys?
1
vote
0answers
28 views

Asymmetric non-interactive proof of work scheme

I'm looking for a non-interactive proof of work scheme. I want for it to (1) be faster to find solutions to if you're in the possession of an arbitrary secret, like a private key, and (2) for the ...
1
vote
1answer
155 views

Scrypt KDF cipher (scrypt CLI) - known vulnerabilities and cryptanalysis?

There is a scrypt cipher that is used for example by some cryptos like LItecoin for their mining algorithm. I never heard of scrypt. I know eg SHA-256 which is well analyzed and considered as secure ...

1
2 3 4 5
15