Questions tagged [cryptography]

Questions relating to cryptographic topics such as encryption/decryption and hashing. (Not for use with trivial ciphers.)

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

RSA encryption/decryption using python [closed]

I'm having slight trouble with a problem with python using Jupyter notebook. So far: ...
0
votes
1answer
121 views

Encryption/Decryption algorithm #3

This is a follow up question to Encryption/Decryption algorithm #2 and Encryption/Decryption algorithm. In my last question, in @Reinderien's answer, he added this line ...
2
votes
1answer
111 views

Encryption/Decryption algorithm #2

This is a follow-up question to this one. I have tried to implement all the recommended things in the answers (except commenting, and not being OS specific). Again, if you see anything that needs ...
3
votes
3answers
87 views

Creating a class and calling it from other .py files

My objective with this code was to create a class and call it from other .py files. The code itself is working, but I would like to know what could be improved or be better implemented. I wrote ...
1
vote
1answer
60 views

Encrypted text - C# SHA256, implementation

I have a C# application which needs to encrypt string and save the key as a hash. The key is saved as a hash to check the right key has been input before trying to decrypt the message. First, I have ...
5
votes
3answers
416 views

Caesar Cipher Encryption / Decryption in Python

I'm trying to write a Python program to predict the most likely substitution for a Caesar cipher. I managed to get it working, but it just seems very clunky and slow, especially because I need to ...
2
votes
2answers
80 views

Encrypting/decrypting messages in java

I am trying to implement message encryption/decryption with password in java. Here is the code I'm using: ...
3
votes
2answers
101 views

Correct implementation of encryption function

I wrote a simple encryption function that uses argon2d as the KDF and XChaCha20-Poly1305 as the AEAD. Since it is very easy to not get things right when dealing with encryption, I would appreciate if ...
6
votes
2answers
439 views

AES implementation in python

For educational purposes, I have implemented the AES block cipher in python. I decided to follow the interface for block cipher modules as defined in PEP 272. The implementation consists of two python ...
3
votes
2answers
176 views

Encryption/Decryption between Python and Node JS

I have created a Python & Node JS encryption/decryption AES 256-CFB. The point of this little project is that I will encrypt a special URL with Python covered with base64 & URL encoding and ...
3
votes
0answers
64 views

Implement kleptography in Python

I'm new here, therefore I hope to be clear in this question. Firstly, I want to underline that I'm not a programmer, and I attended only a beginner course in Python, but I like to solve problems ...
3
votes
1answer
431 views

Very simple encryption API

I need an encryption system with a super simple API. I'd prefer something as simple as the following. The output should also be browser-friendly and ideally url-friendly. ...
3
votes
2answers
146 views

Encrypts a message using the ADFGVX cipher

This is a Java program I implemented to encrypt a string using the ADVGVX cipher. It takes in the message, the passphrase used to generate the Polybius square, and keyword for the transposition part ...
2
votes
0answers
93 views

C++ Crypto: Part 4- Scram

Looking around for modern Crypto libraries. Could not find anything good. I know I probably did this all wrong so work with me here. There will be four different reviews for four structures that build ...
3
votes
1answer
100 views

C++ Crypto:Part 3-pbkdf2

Looking around for modern Crypto libraries. Could not find anything good. I know I probably did this all wrong so work with me here. There will be four different reviews for four structures that build ...
4
votes
1answer
115 views

C++ Crypto: Part 2- HMAC

Looking around for modern Crypto libraries. Could not find anything good. I know I probably did this all wrong so work with me here. There will be four different reviews for four structures that build ...
4
votes
2answers
157 views

C++ Crypto: Part 1- Hash

Looking around for modern Crypto libraries. Could not find anything good. I know I probably did this all wrong so work with me here. There will be four different reviews for four structures that build ...
9
votes
2answers
294 views

Faster and cleaner SHA-1 leading zero histogram with Python

I've written a python code for finding the distribution of the leading zeros of SHA-1. Using random inputs and hashing-then-counting. Normally it is expected to fit the ...
3
votes
1answer
81 views

Simple Password Generator Feedback

This is my first major project in F#, looking for any critique on how I can make it more standard or more concise. Some things I feel like I could have done better are the command flag parsing and the ...
8
votes
1answer
2k views

XOR Encryption, Decryption, and Cracking in Python

I have recently been working through a number of the Cryptopals Cryptography Challenges to try and improve my knowledge and understanding of both cryptography and Python. As five of the first six ...
1
vote
1answer
110 views

Caesar Cipher, done in Ruby

It's an assignment from the Odin Project. Here's my implementation: ...
2
votes
0answers
36 views

SHA-256 implementation in JS (core codes)

As told by experts, I am re-posting the code review request with the code. Brief Description: from outside sha256() will be called with parameter having UTF-16 character set. then after prepareData()...
1
vote
2answers
54 views

Mail Crypt Library for encrypted email [REVISION]

This is a revised copy of the Mail Crypt library based on the recommendations from the last post, as well as reviewing recommendations from the first post that I misunderstood. [Last post] Mail Crypt ...
4
votes
2answers
77 views

Encrypting file from source AEAD

I am trying to encrypt/decrypt file using source code directly. The issue is how to properly do it after reading the file. ...
2
votes
1answer
56 views

Mail Crypt CLI encrypted email wrapper for Gmail

I've spent the past few days writing a python based client that allows you to locally encrypt your message and send it through Gmail. The encryption scheme is based off of hybrid RSA/AES encryption, ...
1
vote
1answer
118 views

Python extended Euclidean algortihm + inverse modulo

I programmed the extended Euclidean algorithm together with the inverse modulo because I am making an RSA system from scratch. Any feedback regarding efficiency etc. is welcome :) ...
1
vote
2answers
177 views

Securely implementing AES/RSA hybrid crypto with PyCryptodome

I wondering if anyone could give me feedback on whether or not this is a secure way to implement AES/RSA hybrid encryption and signatures in python 3 with the PyCryptodome module. All of the encoding ...
2
votes
1answer
31 views

A register of government decrees, authenticated with blockchain and public key cryptography

The full repo is here, but I'll post the most important extracts below. Background I'm trying to get the hang of blockchain and public key cryptography, so I thought it would be fun to create a ...
4
votes
0answers
76 views

Automatically encrypting text editor

I have written an automatically encrypting text editor (github link). The reasons that I wrote this program instead of using vim + gpg are: It's more convenient than vim + gpg (user only needs to ...
10
votes
3answers
2k views

Secrets management, operational security, keeping API tokens hidden while streaming

I've taken up code streaming and I'm concerned that as I do so, I'll leak an API token somewhere. It was suggested that I use something like "a secrets.toml or secrets.yaml or secrets.json file." But ...
2
votes
3answers
120 views

App to Encrypt and Decrypt file

...
2
votes
3answers
458 views

XOR two files together

I am trying to XOR two files each 1Mb which contains only 0 and 1. It works, but I think it is very slow for the C++ program - approximately 4 sec. Could someone, please, suggest the fastest XOR ...
2
votes
1answer
1k views

Java Cryptography AES/GCM/NoPadding without IV

I'm implementing a PAKE-protocol as a university project and one step of the protocol involves sending encrypted data from a key created via a hash function (I'm using SHA-256). I want to use AES/GCM ...
2
votes
2answers
204 views

Encrypt data before sending it to server in a way that makes it unreadable to anyone except the user who sent it

I don't have any experience in cryptography and I've written some crypto code that seem to be working, but I'm not sure if it safe and if the tools and methods I used are right. Objective Make it ...
2
votes
1answer
42 views

Custom code for MD5 in js [closed]

I wanted to write my own code for md5 in javascript and learn its inner mechanics. (I know it is not trusted anymore, deprecated, ... but I'm just learning). I didn't want to just copy the code that ...
3
votes
1answer
56 views

Inversionless Lenstra ECM running way slower than it should

So I was coding Inversionless ECM using Prime Numbers: A computational perspective and when I finished and tried running my program it ran way, way slower than it is supposed to. I have no idea what I ...
3
votes
1answer
332 views

Crypto createCipheriv and createDecipheriv for authentication

I'm not an expert in authentication, so I want to make sure I have done everything right. I am using crypto.createCipheriv and ...
2
votes
2answers
91 views

Encrypting an AES key

This encryption class RSA encrypts an AES key and then when the encrypt method is called it decrypts the AES key and uses the key to encrypt the message and basically the same thing with the ...
2
votes
1answer
114 views

Validate implementation of ECIES

I've created a basic implementation of ECIES (Elliptic Curve Integrated Encryption Scheme) based on http://www.secg.org/sec1-v2.pdf section 5.1. ...
2
votes
1answer
97 views

Berlekamp–Massey Algorithm in Haskell

I was recently tasked to write an implementation of the Berlekamp–Massey algorithm (for GF2) from a given inductional proof and decided to fresh up on my Haskell, since converting a proof by induction ...
2
votes
0answers
75 views

Custom mini cipher

I'm a 14year old and still learning. I know everyone says "don't roll your own crypto", however I decided I must make my own cipher in javascript as soon as I have enough knowledge. I started simple ...
2
votes
1answer
771 views

Java RSA / AES-GCM encryption utility

I wrote a utility class that has simple methods for: En/decrypting data with 256-bit AES-GCM using a password Generating RSA keypair Saving RSA keypair and storing private key encrypted En/decrypting ...
7
votes
1answer
424 views

CypherVault - Command Line Password Manager

I have created a Python 3 password manager for API keys and social media passwords on local storage. The script is 500 lines and PEP8/PYLINT compliant, each definition contains a docstring and the ...
3
votes
1answer
158 views

SHA256 javascript implementation

I implemented a sha256 hash function for javascript just for a practice and I want to know if my code needs more improvement. Please tell me which to simplify if there's any. Thanks. Here is my code: ...
2
votes
2answers
83 views

A better cryptography process

I am experimenting with cryptography and I was wondering if somebody has some suggestion how I could improve my code and methodology. I want my process to generate more securely the cryptography ...
0
votes
1answer
96 views

Cryptopals first challenge - hexadecimal to base64

I've just started the cryptopals-challenge, and now wanted to show my solution to the first challenge here: ...
4
votes
2answers
113 views

Fleissner-Grille / Turning-Grille in Java

I've implemented the cryptographic method of the Fleissner-grille aka Turning-grille . Here's the code: ...
1
vote
2answers
62 views

Decrypt multiple 10Mb files with defined password

One operation of my Android project is to decrypt one file (chosen in a set of ~30 files for pagination1) of ~10 Mb each and I do this with the following: ...
1
vote
1answer
513 views

Password hashing (PBKDF2) and RSA encrypt + AES 256 in Java

Here's what I could comprehend in C code: Generates a key using PBKDF2 Generates an IV which is MD5 of PBKDF2 key in step #1 Does AES-256 encryption on customer-id - which is one of the output RSA ...
7
votes
1answer
177 views

Understanding RSA key generation and implementation in Java

Here is an attempt to leverage Java's BigInteger class to implement the RSA algorithm, as well as md5 and sha512 hashing functions to generate keys for what I hope to be strong cryptography. My prayer ...

1
2 3 4 5
9