Comments (4)
same mistake in:
key exchange and DHKE:
- In a key transport scheme only one of the parties contributes to the shared secret and the other party obtains the secret from it. Key transport schemes are typically implemented through public-key cryptography, e.g. in the RSA key exchange the client encrypts a random session key by
its private key and sends it to the server, where it is decrypted using the client's public keyregardless of algorithm, encrypting by a private key is useless as anybody has access to the public key, so anyone can easily decrypt and reads the original message (or session key)
with reference to the last line!!
@azadkuh messge encrypted with a public key can be decrypted with private key, and not vice versa!
Correct me if I am wrong, I am a newbie at cryptosystems.
from practical-cryptography-for-developers-book.
same mistake in:
key exchange and DHKE:
- In a key transport scheme only one of the parties contributes to the shared secret and the other party obtains the secret from it. Key transport schemes are typically implemented through public-key cryptography, e.g. in the RSA key exchange the client encrypts a random session key by
its private key and sends it to the server, where it is decrypted using the client's public key
regardless of algorithm, encrypting by a private key is useless as anybody has access to the public key, so anyone can easily decrypt and reads the original message (or session key)
from practical-cryptography-for-developers-book.
@guydingmike just realized the problem that u reported.
Since you reportd it a long time ago and the problem is still there I created a PR for it.
from practical-cryptography-for-developers-book.
@Sejal-G you're absolutely right.
some libs even issue an error if a private key is used for encryption, although it may be possible to extract the public key from the private key efficiently (as in RSA)
more ever, it may be mathematically impossible to decrypt a ciphered text by a public key as it does not contain all required bits for decryption.
regardless of mathematical possibility, using a private key for encryption is semantically wrong and compromises the security as everyone can obtain the public key.
ps. I'm not a guru either.
from practical-cryptography-for-developers-book.
Related Issues (20)
- PRNG exercises need clarification about integer representation
- Typo in DHKE page
- Recommended libraries
- Need some clarifications from author about "Secure Hash Algorithms"
- Seemingly incorrect progression in eddsa-and-ed25519.md
- Feature Request: Schnorr Signature Algorithm
- bug / issue report
- I want to contribute.
- More features to add HOT 1
- ImportError: cannot import name 'generator_secp256k1' HOT 6
- ECDSA sign/verify code: update
- Public Key Recovery from raw TX
- IS HOT 1
- Wording: "aesIV" vs. "nonce"
- ImportError: cannot import name 'sign', 'verify' HOT 1
- Missing ^ ?
- Import error:
- Example: Multiply EC Point by Integer
- How to explain "EdDSA is more secure than ECDSA and is designed to be faster than ECDSA " ?
- Scrypt Python code example incorrect
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from practical-cryptography-for-developers-book.