Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stevehjohn/security
Various useful classes for information security
https://github.com/stevehjohn/security
cryptography csharp dotnet shamir
Last synced: 7 days ago
JSON representation
Various useful classes for information security
- Host: GitHub
- URL: https://github.com/stevehjohn/security
- Owner: stevehjohn
- Created: 2019-04-25T15:50:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-04T12:14:34.000Z (8 months ago)
- Last Synced: 2024-12-20T04:36:44.128Z (12 days ago)
- Topics: cryptography, csharp, dotnet, shamir
- Language: C#
- Homepage:
- Size: 60.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Security
Various useful security classes.
## Security.Console
Wrapper to execute the various functions.
### Splitting a secret
Change directory to `src/Security.Console`, then:
```
> dotnet run ToBase64 -t "This is a secret"Original text: This is a secret
Base 64: VABoAGkAcwAgAGkAcwAgAGEAIABzAGUAYwByAGUAdAA=
> dotnet run SplitSecret -s VABoAGkAcwAgAGkAcwAgAGEAIABzAGUAYwByAGUAdAA= --Parts 6 -m 3
1: wbHdhyMsmB0tFR0TN/ekJ/mL9v4nerTU9iIRDSsV70tX
2: Ys5m0fnyge8q+ovn3F/O0OY7L4LgsJ50iMEy5RIwAqGt
3: 8yu7Ptq3GYEHz5ad69tq1x/R2VzHuSrFfoAjmjlA7Z76
4: FEz96iMAh0uPef+dXdfFDuu3E2tVh7787Lwk+C8tNV9N
5: FakgBQBFHyWiTOLnalNhCRJd5bVyjgpNGv01hwRd2mAa
6: ttabU9qbBtelo3QTgfsL/g3tPMm1RCDtZB4Wbz14N4rgAny 3 of these can be combined to obtain the original secret.
> dotnet run Combine --Parts 3
Please enter part 1
> wbHdhyMsmB0tFR0TN/ekJ/mL9v4nerTU9iIRDSsV70tX
> ********************************************
Please enter part 2
> 8yu7Ptq3GYEHz5ad69tq1x/R2VzHuSrFfoAjmjlA7Z76
> ********************************************
Please enter part 3
> FakgBQBFHyWiTOLnalNhCRJd5bVyjgpNGv01hwRd2mAa
> ********************************************Secret: VABoAGkAcwAgAGkAcwAgAGEAIABzAGUAYwByAGUAdAA=
> dotnet run FromBase64 -d VABoAGkAcwAgAGkAcwAgAGEAIABzAGUAYwByAGUAdAA=Original text: This is a secret
```## Security.Secrets.ShamirSecretShare
Split a secret piece of information into x parts, requiring y pieces to obtain the original message.
For example, you may have a password for an operation but require *any* 3 of 5 particular members of staff to ok it.## Security.Crypto.SymmetricCipher
Convenience wrapper to use BouncyCastle GCM block cipher.