https://github.com/cryptosense/diffie-hellman-groups
List of common Diffie-Hellman groups
https://github.com/cryptosense/diffie-hellman-groups
cryptography diffie-hellman-groups
Last synced: 3 months ago
JSON representation
List of common Diffie-Hellman groups
- Host: GitHub
- URL: https://github.com/cryptosense/diffie-hellman-groups
- Owner: cryptosense
- License: bsd-2-clause
- Created: 2016-11-04T12:24:43.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-11T08:12:10.000Z (almost 9 years ago)
- Last Synced: 2025-04-10T15:56:52.764Z (about 1 year ago)
- Topics: cryptography, diffie-hellman-groups
- Language: Python
- Size: 71.3 KB
- Stars: 10
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Diffie-Hellman groups
## JSON list of common groups
You can find commonly-shared Diffie-Hellman groups in `gen/common.json` in the following
form:
```json
{
"name": "Oakley 1 from RFC 2409, 768-bit",
"g": 2,
"p": 1552518092300708935130918131258481755631334049434514313202351194902966239949102107258669453876591642442910007680288864229150803718918046342632727613031282983744380820890196288509170691316593175367469551763119843371637221007210577919,
"length": 768,
"prime": true,
"safe_prime": true
}
```
where `p` is the integer definining the group, `g` is a generator of this group and
`length` is the bit-length of `p`. `prime` is `true` if `p` passed the Baillie-PSW test.
`safe_prime` is `true` if `(p - 1) / 2` passed the Baillie-PSW test.
## Why?
This work is motivated by key exchange weaknesses due to commonly-shared Diffie-Hellman
groups being used, such as pointed out on [weakdh.org][weakdh].
Cryptosense tests for these groups on TLS and SSH servers at
[discovery.cryptosense.com][discovery] and in applications in its [Analyzer][analyzer].
## Contributing
If you found a group used by some piece of software which is not in the list, please open an
issue or a pull request.
[weakdh]: https://weakdh.org/
[discovery]: https://discovery.cryptosense.com/
[analyzer]: https://cryptosense.com/analyzer/