Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
23 views

How much more secure is $c = mg_1^r + g_2(g_1(g_1^r-1)/(g_1-1)) \mod p$ compared to just $c = mg_1^r \mod p$ (dis. log), all known but $r$?

To encode a message $m$ to a cipher $c$ you can use the only hard solvable problem of computing the discrete logarithm with a generator $g$ in base over a prime $p$. $c = mg_1^r$ mod p If an ...
5
votes
2answers
96 views

Origin of values for “security margin”?

It seems that the acceptable "security margin" for ciphers is set to be between 25% and 30% as a target by designers, where this number represents the number of rounds that remain "unbroken" for a ...
6
votes
1answer
115 views

Deterministic Authenticated Encryption with AES-OFB and HMAC

I have an encrypted column in a database that stores sensitive information. The existing encryption scheme is deterministic and a database index exists on the encrypted value to allow searching. I am ...
0
votes
2answers
44 views

human readable unpredictable & no collision uid based on time

I need to create an unpredictable uid based on time. I plan to allow it to work during a time frame of 100,000,000 seconds. So the seconds will go from 00000000 to 99999999. I need an algorithm that ...
1
vote
1answer
72 views

Comparing Shanks' Algorithm to Brute Force

I'm trying to understand how/why Shanks' algorithm solves the discrete log problem $y=g^x \bmod p$ faster than a brute force search does. Any explanation would be great.
1
vote
0answers
45 views

How to create an ultra-secure connection between two clients with xor? [closed]

At work, I was asked to create ultra-secure connection over lan between two computers. It will be some kind of messager. I have a bunch of same random data in them(near 100mb). Also I can start a ...
4
votes
2answers
150 views

Would a HMAC digest make sense in an RSA / ECDSA signature?

When MD5 and SHA1 were broken there was, each time, a scramble to upgrade software and certificates to remove the offending algorithm. However, in each case, the HMAC variant of each hash function was ...
-1
votes
1answer
124 views

Can Shamir’s Trick crack the cryptographic strength of ECDSA?

Recently stumbled upon a discussion in the forum "MyMathForum" What is Shamir’s Trick used for? Are there any such examples?
0
votes
2answers
77 views

Why doesn't the formula work when checking two ECDSA signatures?

There are two generated ECDSA signatures X - Private key S = ((Z + (X * R)) / K) mod n S` = ((Z` + (X * R`)) / K`) mod n G - Base point, of order n; ...
0
votes
1answer
59 views

El Gamal Cryptosystem Proof, Step-by-Step Explanation Needed. I feel like I don't understand what I have on this proof

Can someone provide a good and thorough explanation of the El Gamal proof? Basically, I need a step-by-step breakdown of what is happening at each important part in the algorithm. I haven't been able ...
0
votes
0answers
18 views

Analyzing RC4 with a reduced state array [duplicate]

RC4 is a stream cipher which uses a 256-element array of 8-bit values. All operations are done modulo 256. Is there any research on modified versions of RC4 using a smaller state array? How small can ...
16
votes
4answers
3k views

Are encryption algorithms with fixed-point free permutations inherently flawed?

Flaw in Enigma One of the Enigma machine's flaw was the derangement (fixed-point free permutation) of the produced ciphertext, or simply put: No plaintext-letter can be enciphered to itself. See this ...
2
votes
1answer
73 views

Generating a key pair using a signature generated by an existing key

I’ve built an app in which each user has a private/public key pair and I want to generate a second one for them, however I cannot store the second private key anywhere. What would be the drawbacks ...
1
vote
0answers
70 views

Explaining Berlekamp-Massey Algorithm in simple/layman term?

My foundation in Mathematics is not great. But I would like to understand how Berlekamp-Massey Algorithm works and how it is used in lay-man terms. The only thing I find out there is the emphasis on ...
2
votes
0answers
52 views

Understanding LFSRs and Berlekamp-Massey Algorithm [duplicate]

I have a tutorial question which focuses on LFSRs and Berlekamp-Massey Algo (which is totally out of my syllabus). Please forgive me if my questions seem stupid. I'm given these information: {"...
0
votes
0answers
30 views

Proxy decrypt algorithm in Extended Proxy-Assisted Attribute Based Encryption (ABE) Scheme

Context I'm trying to implement the Attribute-Based Encryption (ABE) scheme described in the paper - Extended Proxy-Assisted Approach: Achieving Revocable Fine-Grained Encryption of Cloud Data (Yang ...
0
votes
1answer
66 views

How do I figure out the number of unique combinations

I am developing an algorithm that uses a lookup table to process the data, I want to know how many unique tables can be created. If I have a table of 256 values I know that 256! would tell me how many ...
1
vote
2answers
40 views

Is there any way to check signed documents in a group of people without knowing who signed which?

Let's say there are 3 people A, B, C. Everybody knows their public keys. They sign documents/messages and normally we can know who signed which by checking with their public keys. Is there any way to ...
0
votes
0answers
13 views

Are compressed pairings used for Barreto-Naehrig curves in practice?

In 2009 Galbraith and Lin wrote the article "Computing Pairings Using x-Coordinates Only" https://link.springer.com/article/10.1007/s10623-008-9233-3, where they proposed to compute pairings on ...
10
votes
4answers
3k views

If Kerckhoff's Principle holds, why do we need a cipher at all?

I understand Kerckhoff's principle, in a very practical sense, that the best attack that can be performed on a given cryptographic algorithm should be only as practical, if not less practical, than an ...
0
votes
1answer
56 views

How to prove that work is done without actually knowing the payload

Is there a way for an algorithm to run securely on one end, whilst the other end is able to be notified and also verify that it has run and done the work without knowing what the actual payload is? ...
3
votes
1answer
128 views

Improving efficiency of an “encryption” algorithm based on a chaotic map

I've implemented an "encryption" algorithm that uses the deterministic chaos of an extended logistic map: $x_{n+1}= r_n \cdot x_n \cdot (1-x_n)$ $y_{n+1} = \begin{cases} \text{$x_n+y_n$}...
0
votes
1answer
98 views

Can Base64 be seen as a way of encryption if we use different index table?

As we know, the index table (which maps bytes in [0, 63] to characters) of Base64 encoding is public, so everyone can decode Base64 strings from others. But what if we use a shuffled index table and ...
-2
votes
1answer
163 views

How could I test my own Cipher? [closed]

I recently developed a new cryptographic algorithm. I just initiated with just nothing in mind. But being near to completion (though my algorithm is constantly developing. Now it is version 11.02), I ...
-2
votes
4answers
594 views

Size of A Hashed String Using SHA-512

When hashing a messages of size of n, does the SHA2 algorithm always produce the same sized hashed value? The reason I am asking is that I am building an OAuth 2.0 ...
0
votes
1answer
80 views

Question about brute force running time

Quite a simple question though I can't wrap my head around it: The key size is: $n$ Because it's brute force it tries each possible key once from $0$ to $n$, but in my head that just makes the run ...
2
votes
0answers
45 views

Reduction from integer factoring to computational Diffie Hellman

The computational Diffie Hellman (CDH) problem for ${\mathbb{Z}}^*_p$ is given a prime $p$, a generator $g$ of ${\mathbb{Z}}^*_p$, and a pair $(g^i, g^j)$ to compute $g^{ij}$. The value $g$ is called ...
2
votes
2answers
205 views

Does there exist a CSPRNG that does not require generating prime numbers, but also does not depend on any other cryptographic primitives?

The following excerpt is taken from the “Cryptographically secure pseudorandom number generator” article on Wikipedia: CSPRNG designs are divided into three classes: those based on ...
2
votes
2answers
111 views

Cryptography scheme to prove you really are the author for something

Say I'm a researcher like Satoshi Nakamoto that wants to stay anonymous. I want to publish documents and sign them somehow. A few years, I want to reveal my identity and prove it was me who was ...
3
votes
1answer
66 views

Could we use a more efficient hash for signature generation?

Is it possible to use a more efficient hash - such as one based on GHASH - instead of a cryptographic hash for signature generation? In other words, could a combination of a fast hash and the private ...
2
votes
2answers
77 views

Is there a way to sign a message without being allowed to see it?

I want to sign a message while not being able to see the message. Logically, there should be a way, I just don't know how this translates into cryptography. Here is an illustration for what I mean: ...
3
votes
3answers
286 views

Is it possible to exactly reverse engineer an unknown cipher inside a black box?

Consider the following arrangement:- There is an unknown cipher algorithm operating inside the black box. You can enter infinite key /plain text pairs, and observe all of the outputs. The box might ...
0
votes
1answer
37 views

Secure offline treasure hunt

Say I would like to create an app that would allow users to organize treasure hunts for their parties. The host of the party would create a list of GPS coordinates for each hiding spot and distribute ...
0
votes
1answer
298 views

How many rounds of encryption is ideal?

I am a newbie to the cryptography world. I am working on a custom algorithm that encrypts the data multiple times and results in a cipher text. It uses a different key in each round to encrypt it. I ...
4
votes
1answer
85 views

Can length extension attacks be avoided by a single bit flip?

It always seemed to me that length extensions are possible simply because no special operation is performed after the last operation - for instance in a Merkle-Damgård construction. Basically the MD ...
1
vote
2answers
78 views

Encrypting current time using 3DES as a signature

I came across a peculiar system for generating "signatures" ("signatures" is within quotes because this is a bad use of 3DES) in the wild. It works as follows: a symmetric key is generated and used ...
2
votes
0answers
37 views

Can we encrypt data that must be decrypted with any private key plus a server generate bits?

I have come up with a scenario to make a secure data. Suppose I have a public encrypted file that anybody can download. But whenever anyone want to decrypt that data they need to get a key from server ...
3
votes
2answers
198 views

Is this algorithm good enough for small radio messages?

This question is related to: How to implement security - authenticity/confidentiality/integrity for 6/14 bits radio messages? I am looking for a message that an attacker listening to the radio ...
5
votes
3answers
309 views

Where can I find the description of SHA0 algorithm?

Where may I find the description and or pseudocode for the SHA0 algorithm. I am looking for something on these lines - HMAC RIPEMD. I have been implementing a few of those (HMAC, HOTP, TOTP and MD4, ...
2
votes
0answers
135 views

How few cryptographic primitives can we use to derive all other constructions?

We have a lot of cryptographic primitives now, and many methods of deriving one type of scheme from another. There are even some like the Merkle signature scheme, which uses a hash function to derive ...
3
votes
2answers
649 views

understanding the block bits for DES

I'm trying to understand cryptographic protocols, and I've started with the DES algorithm. DES specs: it uses 64 bits for the plaintext, 56 bits for the key, with a result of the same 64 bits of ...
2
votes
2answers
121 views

rotor machines: secrecy of wiring

During the heydays of rotor machines, the internal rotor wiring was always a closely guarded secret. Even fully cleared repair staff was not allowed to do anything that could reveal it. As the ...
1
vote
2answers
109 views

Public-private algorithm where it is not possible to recover public key from private key?

Is there an asymmetric algorithm where it is not possible to extract a public key from private key? So far any algorithms I tried (dsa, rsa, ecdsa, ed25519) successfully recover their public keys from ...
2
votes
1answer
35 views

Optimized Garbled Circuit Algorithmic Description

Till 2018, Garbled Circuit (GC) is of its age 30's and many optimization methodologies have been proposed, including point-and-permute, row-reduction, free-xor, fixedkey-blockcipher, half-and. But, ...
0
votes
1answer
54 views

Cryptographic algorithm for knowing who has more money?

I recall reading about this but forgot what it’s called. Suppose two people want to know who is richer but don’t want to reveal their net worth to the other. How can they securely exchange info to ...
0
votes
1answer
65 views

Reference for the Tortoise and Hare algorithm by Floyd?

Can someone please point me to a book or paper that describes the Tortoise and Hare algorithm by Floyd? I know there are ample websites out there, but for reference purposes, I need a book or paper ...
3
votes
0answers
250 views

Fastest known Elliptic Curve Cryptography “solution” (coordinate systems (multiple?), algorithms, precomputed values etc)?

I am writing an Elliptic Curve Cryptography SDK in pure Swift, and currently I am only using Affine Point and simple Double-and-add. I am soon about to work on a faster solution. I am asking for help ...
8
votes
2answers
415 views

Which attacks are prevented by the different initial hash values for SHA-2 with truncated output?

NIST specified SHA-2 hash functions with truncated output. Those hashes use different initialization values than SHA-256 or SHA-512. SHA-224 is based on SHA-256. SHA-384, SHA-512/224 and SHA-512/256 ...
1
vote
1answer
76 views

Are MD5 possibilities really $2^{128}$? [duplicate]

I have a simple question: Are we certain that the md5 hashing algorithm can produce $2^{128}$ different outputs ? If so, how ? Note: Sorry if this has already been asked, I really couldn't find it.
0
votes
0answers
67 views

Is this modification of the sponge function cryptographically weaker than the standard sponge function?

Let $\lfloor A \rfloor_B$ denote the first $B$ bits of a bitstring $A$. Let $F$ denote the underlying function of the sponge construction (for SHA-3, $F = \text{Keccak-}f[1600]$ ), assuming that ...