All Questions
Tagged with cryptography python-3.x
37
questions
2
votes
1
answer
132
views
Password recognition with cryptography
Since I only just learnt about this, I wanted some advice on better practices I can use when it comes to cryptography. Still learning python and hoping I can get this 'hashing' and 'salting' thing in ...
2
votes
1
answer
3k
views
Python 3 Playfair cipher encrypter and decrypter
I have written a Python 3 program that can encrypt and decrypt Playfair cipher, though I know it has been implemented countless times, none of the scripts I have seen so far(e.g. https://codegolf....
2
votes
1
answer
1k
views
Python script to compress and encrypt a list of files/directories (tar + gpg)
I've tried, as practise, to write a Python 3 script which takes a list of paths to files/directories and compresses them with tar, before encrypting the resultant ...
5
votes
3
answers
1k
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 ...
6
votes
2
answers
1k
views
Python 3 Vigenere Cipher
I'm still fairly new to Python and I'm trying to see if I've efficiently used modules, functions, etc or if there's another/easier way to do something.
This Python 3 Vigenere Cipher is a rebuild of a ...
3
votes
0
answers
89
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 ...
8
votes
1
answer
5k
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
2
answers
85
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
1
answer
296
views
Mail Crypt Library for encrypted email
(Last Post) Mail Crypt CLI encrypted email wrapper for Gmail
I've spent the past few days re-writing the logic of my program as a library to improve the structure and readability of my code. The idea ...
4
votes
1
answer
88
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
2
answers
1k
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 ...
3
votes
1
answer
101
views
Grokking the basics of BlockChain with Python
As I was streaming I had a brilliant visitor suggest we write a blockchain in Python.
So we did.
Note that there is no validation or voting simulated here.
Here's the results, in ...
4
votes
0
answers
149
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 ...
3
votes
1
answer
87
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 ...
7
votes
1
answer
722
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
1
answer
129
views
CliwPw - Yet Another Python3 Password Manager
I wrote a (very) simply Python3 password manager to familiarize myself with Sqlite3, and for fun. I am aware that there are already a variety of password managers out there, but I wanted something ...
16
votes
3
answers
3k
views
A Caesar cipher in Python3
This code basically just does a Caesar cipher on the contents of the variable "s" with a shift of 1.
Sorry if the comments on the code don't explain it well. I'm quite new to Python and I'm not very ...
4
votes
1
answer
111
views
PRBHA-10: A hashing algorithm in Python
So I've been working on a simple little hashing algorithm for Python that I like to call PRBHA-10 for short, or Pseudo-Random-Based Hash Algorithm. This is a hash algorithm in Python that is meant to ...
5
votes
2
answers
2k
views
Python AES-CBC implementation using AES-ECB
I am looking for ways to make this code more "pythonic" and any issues with my implementation. This was designed to solve Crytopal's Challenge 10. This challenge requires recreating the AES-CBC cipher ...
8
votes
3
answers
761
views
Generate public/private keys, encrypt, decrypt, sign, verify
My program generates public private keys, encrypts, decrypts, signs and verifies, while using AES for the bulk of the data for speed, and encrypts the random key with RSA. Many operations were chosen ...
1
vote
1
answer
990
views
Using encryption/hashing to create a secure login
I am creating a login for an encrypted chat application which retrieves login information from a MySQL database. I have got to the point where I feel pretty confident that (to the best of my knowledge)...
2
votes
1
answer
553
views
Vigenère decoder/encoder in Python (using matrix)
I made an encoder/decoder for the Vigenère cipher. This one is using a table, not the remainder technique. Please let me know what you think can be done to improve performance, etc.
...
3
votes
1
answer
523
views
Script to encrypt a file and add it to IPFS(ipfs.io)
Here is the script that I would like reviewed for the following:
Best practices and design pattern usage
Correctness in unanticipated cases
The script is made to store (IPFS) Interplanetary File ...
4
votes
1
answer
156
views
(Final)Simple Decryptor/Encryptor
This is my final version of my simpel Decrypter/Encryptor called Dencryptor. This is one of my first Python projects and I think it turned out pretty good. I am using a Caesar cipher right now and I ...
3
votes
0
answers
357
views
ECDH implementation in python (part 3)
After the first and second part, the primary feedback I got was to rename a lot of my variables as I used the same name for different local variables which is really confusing. I tried to hotfix that, ...
0
votes
1
answer
259
views
ECDH implementation in python (part 2)
I worked a while on my code I posted here to make it more flexible and hopefully a little bit more secure. My goal is to implement a secure library for elliptic curve cryptography.
...
21
votes
4
answers
44k
views
RSA algorithm implementation in Python 3
First, a reminder of the RSA algorithm and what my program implements:
Take two distinct, large primes p and q
Ideally these ...
16
votes
2
answers
3k
views
ECDH implementation in python
I wrote an implementation of elliptic curve Diffie-Hellman key exchange in python. I would like to know if I could make it faster, cleaner or more secure:
...
12
votes
2
answers
2k
views
Baconian Cipher Python Implementation
I have been trying to implement various substitution ciphers in python. I implemented the Baconian cipher using a dictionary in which the plaintext letters are keys and the ciphertext letters are the ...
6
votes
2
answers
4k
views
Encrypting files in a directory (AES)
I am quite new to Python (and programming in general). I was trying to create a command-line program for encrypting my files. Please tell me what I can improve (styling, crypto, etc.)
Disclaimer: I ...
3
votes
1
answer
2k
views
Implementation of Ceaser's Cipher in Python
This is my implementation of a Ceaser's Cipher in Python using OOP principles. I'm looking for feedback for any code starting from the function build_shift_dict (...
1
vote
1
answer
856
views
Encrypting and decrypting strings using Caesar cipher
I was inspired by a solution in Think Python: How to Think Like a Computer Scientist. I structured mine (into two functions) according to it, and used the technique used in
...
6
votes
1
answer
4k
views
Generating public/private RSA key pair programmatically, using it for JWTs
In my app I'm using JSON Web Tokens for authentication purposes, using the pyjwt library. Instead of using static keys and/or worrying about key distribution, the server generates a public/private key ...
4
votes
2
answers
9k
views
One Time Pad algorithm for encryption and decryption
I have written my own one time pad algorithm for encryption and decryption, but I would like to listen to your opinions about its correctness and eventually how could I improve it. My idea was to keep ...
4
votes
2
answers
10k
views
Simple stream cipher encryption/decryption function
This is a Python implementation of a stream cipher encryption algorithm. This implementation originates from the one displayed on the TI-Basic wikidot cryptography page.
I am well aware that this code ...
4
votes
1
answer
4k
views
Python mnemonic ↔ hex conversion (Bitcoin BIP39) - follow-up
Original question:
Python PBKDF2 using core modules
I'm looking for commentary on the following code, which converts from a hex seed to mnemonic (12 word phrase), and vice versa. It's for Bitcoin (...
5
votes
1
answer
1k
views
Simple encryption based on MD5
I made a Python 3(.4.2) program that only adds classes and is meant to be imported. It allows the creation of files that store usernames and hashed passwords. It uses salting as well. It also can ...