Questions tagged [cryptography]

Cryptography is the practice and study of logical means used to achieve information confidentiality, integrity and authenticity. It covers, among other things, encryption (making some data unreadable except for those who know a given secret element, called a key), data hashing (in particular for password storage) and digital signatures (provable integrity and authenticity with non-repudiation).

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

Finding block mode and key length from encrypted data [migrated]

I have an AES encrypted data and the key, but I am not able to tell the block cipher mode [ECB|CBC|CTR] used in encryption or know the key length. Below is the encrypted data output in java. {"...
1 vote
1 answer
72 views

Java Cryptography classes - program agnostic usage

We are planning on implementing encryption or digital signatures using any of the available classes provided by the Java Cryptography Architecture (e.g. KeyPair, MessageDigest, Cipher, KeyStore, ...
0 votes
0 answers
61 views

How to find the correspond hash algorithm? [duplicate]

I'm currently working on a project. but i still facing some issue due to some crypted data. i know the plaintext and got the correspond hash. plaintext: C018AE45B37DAE665486F4151E0C1E6F Hash: rROkd+...
0 votes
0 answers
39 views

eSIM/eUICC relay attacks

I'm trying to understand how the eSIM is protected against cloning. Here is the diagram from GSMA standard: Now the ICT operator has its own security domain in which all the GSM related keys ...
  • 39
1 vote
0 answers
19 views

Is SRP/PAKE equivalent to an asymmetric crypto challenge?

As an amateur cryptographer and professional slowpoke, I just learned about SRP (and other PAKE protocols), and my thoughts immediately wandered to asymmetric crypto challenge protocols, like WebAuthn(...
  • 171
1 vote
0 answers
35 views

Decrypting a Base64 ciphertext [duplicate]

I am working on a challenge that includes decrypting a piece of ciphertext. The sample decryption provided is as follows: ...
1 vote
1 answer
43 views

Encrypted semantic search

I want to implement semantic search but in an encrypted fashion. For storing passwords, we store Enc(password) in a database, and when a user logs in, we check if Enc(query) == entry in the database. ...
3 votes
4 answers
2k views

Using a Client and Server secret to double salt a hash

I want to log IP addresses visiting my site, for aggregated statistics only and to see if the same IP address has visited twice. But I don't want to expose them. My Idea is in my database. $...
  • 131
0 votes
0 answers
15 views

Cryptographic primitive for delegating authority to another pubkey recursively

Is there a cryptographic primitive that allows pubkeys to delegate authority to each other without preserving the whole chain? I'm considering an authorization scheme where all authentication is based ...
1 vote
0 answers
52 views

How to achieve an authentication method FIPS 140-3?

I've been studying the FIPS 140-3 but I still have questions about how to determine if an authentication protocol is FIPS compliant or not: 1- Is RADIUS over EAP-TLS FIPS 140 compliant? I know that ...
  • 11
2 votes
1 answer
82 views

How to use (py)NaCl/libsodium for key wrap, key encapsulation

We want to wrap / encapsulate a symmetric key with an asymmetric keypair, a symmetric key with a symmetric key, a private key with a symmetric key. In each case, we'd like to allow several keys to ...
0 votes
1 answer
59 views

Hashing a secret key with a random string to generate a new key

Lets say Alice and Bob have a secret key k1. This key is 50 chars long and is cryptographically random. Alice generates a cryptographically random string (e.g. 16 chars long) and hashes this string ...
1 vote
0 answers
19 views

Question regarding DH/RSA/Public key cryptography [closed]

Courses giving introduction to cryptography often refer to an example where Alice and Bob need to communicate through an evil postman, and dispose each of a lock, its key and a box in which to send ...
  • 11
0 votes
0 answers
76 views

Extracting a Bit String from a .pfx file's private key

I'm currently working on a website backend program for a client, that scrapes info from a South Korean website. The login system is certificate based, and I'm currently testing things out with a .pfx ...
0 votes
1 answer
45 views

Does the ssh client compute the public key from the private key?

If I use ssh like this ssh -i id_rsa it means im passing the private key to ssh. Does ssh now then compute the public key from it and then send it to the server? Then the server would look if the ...
0 votes
1 answer
67 views

Client side encryption for a user with multiple devices

I am currently developing an app that sends the data encrypted to a server, because the important thing with the app is that the server should never know what data is there, only the client should ...
  • 1
0 votes
0 answers
38 views

fscrypt master key handling at kernel space adding additional secure params

In fscrypt, the master key is generated from userspace and actual encryption keys are derived from this master key using KDF. If any other process is able to get hold of the master key, they can ...
1 vote
0 answers
17 views

Can parts of WebCrypto AES-GCM be reused between encryptions

I am trying to better understand the processes involved in e2ee using WebCrypto on the browser. I understand that the only real method to use a passphrase to generate a symmetric key on the browser is ...
  • 111
4 votes
1 answer
128 views

Why should I re-generate a server's SSH host keys?

This server hardening guide suggests re-generating the RSA and ED25519 host keys. What is the advantage of re-generating the default key?
2 votes
1 answer
83 views

Why should I disable insecure SSH hostkeys if I never plan on using them?

A number of articles suggest removing insecure (broken) SSH key types in order to have a more secure server. In practice, if I only connect to the server with secure key types, why should I bother ...
1 vote
3 answers
147 views

Is it possible to retrieve seed from a few random numbers?

Let's say I have generated 16 integers (between 0 and 128) using Python from random import seed, randint seed(1234) randoms = [randint(0, 128) for _ in range(0, 16)] If we have a rough knowledge of ...
0 votes
3 answers
70 views

Can secret recipients be included in PGP cryptography

Can we be sure that a cleartext message that becomes encrypted by pgp or openpgp which is intended for one-or-more specific recipients doesn't also get secretly decipherable by a third party? Since i ...
  • 1
0 votes
1 answer
60 views

Password reset encryption mechanism based on username [duplicate]

Short I known 0x02135 gets encrypted to -> NzY4MzY5 0x02136 gets encrypted to -> NzcxMzc0 ...etc I want to know 0x02137 will get encrypted to -> ??? (in ...
5 votes
2 answers
944 views

Why did WebAuthn beat PAKEs as the preferred password replacement?

Apple and now Google are releasing products that are built on WebAuthn as a replacement for traditional username + passwords. Why did this technology beat out PAKEs?
  • 474
0 votes
0 answers
51 views

In asymmetric encryption, is there a meaningful difference between the public and the private key? [duplicate]

Is it possible to swap them, so that the public key is kept secret while the private key is public? Or do they actually function differently? Thinking specifically about DSA though I'm interested if ...
2 votes
1 answer
184 views

Is any client-sided password just security by obscurity?

Let's say I want to deploy a simple static website (with no backend server) with some protected pages only visible after entering a password. I could write a hardcoded salted hashed password and ...
  • 123
0 votes
1 answer
79 views

Cryptographic hash functions and personal password management [duplicate]

Background: I've always reused same username/password on all websites and got hacked regularly. I am considering using a password manager, but I don't like the need of storing a database. So I came up ...
  • 103
0 votes
0 answers
25 views

Authentication in RESTful APIs using proof of private key

I know that breeding your own security is bad practice, however I couldn't find anything about this on the internet. So I basically want to add an authentication mechanism where the client proves that ...
  • 142
0 votes
1 answer
56 views

Add directory of Luks partition to system PATH

I would like to keep some secret executable binaries inside a LUKS partition. This partition is not mounted automatically at boot, but only manually in some moments I would like to automatically add a ...
  • 121
0 votes
1 answer
56 views

Verify sender/source using encyrption with a private key

I have an application that retrieves data from other IoT devices (think in my home, or personal health devices for monitoring). How can I make sure that the data my application receives comes from the ...
0 votes
1 answer
59 views

Probability of getting different plaintext with different key

What is the probability that an AES encrypted file, using a wrong password, gets decrypted to something different than the plaintext, but which could still be likely to be interpreted an the true ...
  • 15.6k
0 votes
1 answer
75 views

Why GNU libc's salt alphabet for `crypt` is limited to ./0-9A-Za-z?

According to docs: To hash a new passphrase for storage, set salt to a string consisting of [a prefix plus] a sequence of randomly chosen characters ... and In all cases, the random characters ...
  • 103
10 votes
1 answer
2k views

What are some ways to ensure that a cryptography library is reliable in an ecosystem that is new to me?

Cryptography is a core security service, and is generally considered a specialty that is difficult to get right unless one knows what they are doing. Furthermore, cryptography API misuse is rampant ...
  • 1,069
0 votes
1 answer
64 views

GnuPG: gpa.exe hungs when click on "smartcards" AND scdaemon cannot recognise SC-HSM 4K

https://dev.gnupg.org/T6097 I am tring it get GnuPG to work with my SmartCard-HSM 4K on Windows, using the GP4Win bundle. Kleopatra doesn't recognise the SC-HSM 4K at all, even though, it DOES ...
2 votes
1 answer
1k views

CryptoJS AES encryption/decryption problem

A simple encryption/decryption using CryptoJS gives me a weird output. Can anyone point me to where the code is wrong? (I'm looking for the output in the console) var code = "Testcode"; var ...
  • 23
1 vote
1 answer
72 views

can these encryption methods for a text file protect against physical access to machine by adversary?

My threat model is that, the adversary has physical access to the machine and root access. I don't care about any data on the system other than a couple python scripts that contain sensitive ...
0 votes
0 answers
363 views

How to fix import private key in GPG?

Since, I am new to gpg I wanted to generate a key pair. So I typed gpg --full-gen-key and inputted the following: root@kali-linux:~# gpg --full-gen-key gpg (GnuPG) 2.2.35; Copyright (C) 2022 g10 Code ...
  • 101
0 votes
0 answers
71 views

Gaussian noise added to image, how secure is it?

Parties A and B know the random noise seed. Assume the seed is perfectly secure. Can the image possibly be recovered by someone who doesn't know the seed, assuming they have the decryption source code?...
2 votes
0 answers
98 views

How are the values of stored firefox credit cards encrypted? And how does one decrypt those?

While researching about the safety of web browsers I made my own program that can decrypt stored credentials, cookies, and other information of different browsers to see for myself how easy it is. ...
  • 21
0 votes
1 answer
118 views

I'm testing an app that uses only v4 UUIDs as a cookie for authentication. What are some attacks I can try?

What are some attacks I can try against this form of authentication? How do I test if they are cryptographically secure as well?
1 vote
0 answers
224 views

How exactly does OpenVPN's tls-auth option apply HMAC to packet messages?

Update: I've been able to work out everything I was asking about packet structure when I was finally able to get Wireshark to work, but there is one last thing I'm confused on which I detail at the ...
  • 99
1 vote
1 answer
157 views

Is providing a static TLS key during an OpenVPN handshake useless for commercial providers?

When using OpenVPN, tls-auth and tls-crypt are widely adopted options, allowing a static key to be used in the initial handshake. This helps prevent against DoS attacks, as without the valid key a ...
  • 99
2 votes
2 answers
193 views

Does any real world protocol makes use of the associated data in AEAD?

I'm trying to find evidence of use of the associated data (authenticated cleartext associated with the encrypted and authenticated data) feature offered by AEAD (Authenticated Encryption with ...
  • 5,371
-1 votes
1 answer
144 views

Steganographically hide encrypted packets for VPN, Tor, etc?

We all know about different encryption methods used today in secured connections like VPN, Tor, etc. However, there is an issue with usage of those. Even if the outsider can not decrypt the message, ...
0 votes
0 answers
59 views

Import BDK encrypted under the Transport Key KEK on HSM

I received a two-component KEK TDES key and a BDK cryptogram, which is encrypted for this KEK. Do you have any suggestions on how to load such a key into the HSM device? Eg. Luna HSM
0 votes
1 answer
67 views

Is api encryption key vault services really secure?

I am looking for a secure (and as easy as possible) way to store my encryption key. I have been looking at some services that will hold the key for you and then you can retrieve it with an api. The ...
7 votes
6 answers
6k views

What's the point of hashing a password and then sending it to the server?

If the password is hashed and then sent to the server where the hash is compared to the stored hash, this basically means that if someone had that hash they can still log in by sending the hash in the ...
1 vote
1 answer
279 views

End To End Encryption Model

I have an architecture which requires a certain subset of data to be more heavily secured and encrypted. The main parameters which I believe meet the scope of the project are as follows: Data should ...
1 vote
3 answers
249 views

Proving that a file existed at a time

How do I acquire the means to prove in the future that I had possission of a file now, without relying on the integrity of a single entity? (I believe one way of doing it would be to put the file ...
3 votes
1 answer
2k views

Can we add TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 on windows server 2012 using gpedit although not supported by windows OS by default?

We are using IIS on Windows 2012-R2 server to host dotnet apps. From the app, when we try connecting to an external 3rd party api we see TLS handshake failure. On running ssllabs test on that api, I ...

1
2 3 4 5
47