Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rudifa/private-public-key
Demo basic usage of private + public key to encrypt/decrypt and sign/verify
https://github.com/rudifa/private-public-key
Last synced: 24 days ago
JSON representation
Demo basic usage of private + public key to encrypt/decrypt and sign/verify
- Host: GitHub
- URL: https://github.com/rudifa/private-public-key
- Owner: rudifa
- Created: 2024-02-17T13:01:34.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-02-17T13:01:41.000Z (9 months ago)
- Last Synced: 2024-10-07T01:41:33.186Z (about 1 month ago)
- Language: Python
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# private + public key
[overview](https://chat.openai.com/c/d143f08d-2a61-4ca4-891e-935647da843f)
- encrypt / decrypt
-
```
message = ...
ciphertext = public_key.encrypt(message, ...)
...
decrypted_message = private_key.decrypt(ciphertext, ...)
```
- sign / verify
-
```
signature = private_key.sign(message, ...)
...
public_key.verify(signature, message, ...)
```