Latest Crypto related questions

Score: 5
SAI Peregrinus avatar
What uses are there (if any) for asymmetric message encryption?
si flag

What uses are there (if any) for asymmetric encryption of a message, instead of hybrid encryption? Specifically, I'm not considering asymmetric encryption of a symmetric key (eg old TLS RSA key exchange) as asymmetric encryption of a message, nor am I considering KEMs or (EC)DH as asymmetric encryption of a message, since all these methods are used to set up symmetric encryption.

I'm interested i ...

Score: 2
DannyNiu avatar
What motivated CCM's monstrous design?
vu flag

The formatting function in Appendix A of NIST-SP-800-38C is a monster enabling CCM to support variable-length nonce from 7-13 bytes, variable-length encoding of the length of the payload. Also, the tag length is encoded in the formatting function making naive truncating of the MAC tag potentially incompatible with ciphertext instances with specific parameters.

The GCM mode and ChaCha20-Poly1305 are much  ...

Score: 0
Mahsa Bastankhah avatar
Comparing two private values and extracting the ciphertext corresponding to the minimum value
de flag

How can I solve this problem: I have a directed graph of nodes that can be malicious and all of them have a private value.

  • Consider a node "B" with private value "BPrivateValue = b"
  • B's ancestor is called "A" and A's private value is "APrivateValue = a".
  • B's descendant is called "C" and C's private value is "CPrivateValue = c".

I want every node in this graph to be able to do the following(here we  ...

Score: 0
Jaime avatar
Using hash of data as proof of integrity and preventing collision
us flag

Rather than storing user data when interacting with an app, I am storing the SHA3-256 of the data. This is because data storage in this particular environment is very limited.

The data can be several variables, e.g., a, b, and, c, but instead of saving them individually, I save the hash of the concatenation: SHA3(a,b,c).

When the user wants to interact with the system, they should send the variables ...

Score: 3
Alex James avatar
Cracking $f(x) = Cx \oplus Dx$
in flag

A program I reverse engineered is using $f(x) = Cx \oplus Dx$ where C = 0x20ef138e415 and D = 0xd3eafc3af14600 as a hash function. Given a byte array, the hash is is obtained by repeatedly applying $f$ to the current hash xor next byte.

Java code:

    public static long f(long x) {
        return (0x20ef138e415L * x) ^ (0xd3eafc3af14600L * x);
    }

    public static long hash(byte[] bytes) {
        l ...
Score: 1
siba36 avatar
decryption in IDEA if the encryption was made without the output transformation
us flag

I'm implementing IDEA encryption and decryption and I'm trying to implement it in different variants(e.g if we didn't do the output transformation or if we don't do full 8-round encryption).

I got the encryption and decryption right for all variants when there is an output transformation, but I'm having trouble in decryption when there is no output transformation.

I know that decryption in IDEA is b ...

Score: 0
Elan613 avatar
Prove that ECB-mode of a block cipher is not EAV-secure
vn flag

I know that ECB-mode of block cipher is not recommended to use as it is not secure and is not even EAV-secure. However, I still don't get how to prove that it is not EAV-secure and what adversary is associated with this insecurity? Any help would be appreciated. Thanks in advance. Edited: I found a similar article here: Proving a scheme's EAV-insecurity, and also figured it out. Thank you for all your ...

Score: 0
Natwar avatar
Which contemporary programming language is apt for implementation of algorithms in cryptography?
in flag

I am a researcher in cryptography. Most of the time I generally do theoretical/Mathematical work only and not doing the implementation part.

I am not able to get the feel about the time complexity of algorithms theoretically. We can get the time complexity of algorithms by doing proper implementation. I want to implement algorithms/schemes to find out the time complexity and other aspects of algo ...

Score: 1
DannyNiu avatar
Are blockciphers with 64-bit blocks still relevant (in any scenario)?
vu flag

Facts

  1. Blockciphers are used to build encryption algorithms and compression functions for hash algorithms.

  2. (Unkeyed) Permutations are also complementing blockciphers in encryption and hashing.

  3. Large block sizes are preferred.

  4. But There are embedded/IoT/lightweight systems.

  5. There are still mode of operations defined for 64-bit blocks AND there are still 64-bit blockciphers with key lengths that're ...

Score: 0
J. Doe avatar
Are there any block ciphers (like AES) which are (or can be) commutative under composition for different keys?
at flag

Let $BC$ be a block cipher with similar security as AES (in ECB mode). This $BC$ is applied to a message $m$ of same bit size. The result is a cipher $c$.

e.g.;

$$BC(key_A,m) = c_A$$ $$BC(key_B,m) = c_B$$

I'm looking for a $BC$ with: $$BC(key_A,c_B) = c_{BA}$$ $$BC(key_B,c_A) = c_{AB}$$ where $$c_{AB}=c_{BA}$$ but for the majority: $$c_{A}\not=c_{B}$$


Is there any way to construct keys $key_A, k ...

Score: 3
Mahsa Bastankhah avatar
Does asymmetric order-preserving encryption exist?
de flag

As I understand from this post, mapping from plaintext space to ciphertext space is the fundamental point of all order-preserving encryption. So the only way that we let someone encrypt an arbitrary plaintext is to give him/her this mapping. But, on the other hand, if we give someone this mapping, the encryption breaks because anyone who has access to it can easily decrypt any ciphertext since this mapp ...

Score: 0
Sean avatar
How Can Indistinguishability be Proven?
yt flag

I'm curious on how computational indistinguishably is proved.

For instance, would the following be computational indistinguishable? If it is, how do we prove it?

Let $P_a$ be a probabilistic machine which knows a secret $a$ and generates a sequence of $n$ tuples: $(x_1,{x_1}^a),...,(x_n,{x_n}^a)$ where the $x_i$ for each tuple is randomly sampled from a prime order cyclic group. Similarly, let a PPT ...

Score: 1
Perseids avatar
Can the hash of a PKCS1 v1.5 RSA signature be used as a key derivation function?
na flag

I know this sounds crazy, but hear me out. As a follow-up to Can the AES-GCM authentication tag be used as a key derivation function?, I'm also considering more creative solutions to derive unique (symmetric) device keys from a securely stored root key.

(The background is that we have a lot of clients (=devices) that can't use asymmetric cryptography (mostly because of hardware constraints). To e ...

Score: 1
LimesBytefend avatar
How to generate a random string in Python for a mission-critical application
kr flag

I'm trying to figure something out, but it is difficult for me. I need to generate a fully random string in Python. My current function is attached below. I just want to know whether this is secure and good for the project that I'm working on, a cryptocurrency type of website.

import random
import string

def get_random_string(length):
    result_str = ''.join(random.choice(string.ascii_letters) fo ...

The Stunning Power of Questions

Much of an executive’s workday is spent asking others for information—requesting status updates from a team leader, for example, or questioning a counterpart in a tense negotiation. Yet unlike professionals such as litigators, journalists, and doctors, who are taught how to ask questions as an essential part of their training, few executives think of questioning as a skill that can be honed—or consider how their own answers to questions could make conversations more productive.

That’s a missed opportunity. Questioning is a uniquely powerful tool for unlocking value in organizations: It spurs learning and the exchange of ideas, it fuels innovation and performance improvement, it builds rapport and trust among team members. And it can mitigate business risk by uncovering unforeseen pitfalls and hazards.

For some people, questioning comes easily. Their natural inquisitiveness, emotional intelligence, and ability to read people put the ideal question on the tip of their tongue. But most of us don’t ask enough questions, nor do we pose our inquiries in an optimal way.

The good news is that by asking questions, we naturally improve our emotional intelligence, which in turn makes us better questioners—a virtuous cycle. In this article, we draw on insights from behavioral science research to explore how the way we frame questions and choose to answer our counterparts can influence the outcome of conversations. We offer guidance for choosing the best type, tone, sequence, and framing of questions and for deciding what and how much information to share to reap the most benefit from our interactions, not just for ourselves but for our organizations.