OPENSSL-PRIME(1SSL)
β¨ NAME β¨
okay so this is openssl-prime β it's a lil OpenSSL command that literally just computes prime numbers π
part of the OpenSSL fam, and yeah it's that same openssl prime you already know and love.
πΈ SYNOPSIS πΈ
openssl prime [-help] [-hex] [-in] [-generate] [-bits num] [-safe]
[-provider name] [-provider-path path] [-provparam [name:]key=value]
[-propquery propq] [-checks num] [number ...]
π DESCRIPTION π
so basically? this command checks if the numbers you hand it are prime. that's the whole vibe check. give it numbers, it tells you if they're prime. iconic.
and if you don't give it any numbers on the command line? then bestie you better use the -generate flag, because it's gonna generate primes for you instead β following whatever requirements the rest of the flags are specifying. no numbers + no -generate = nothing's happening, okay? π«Ά
π OPTIONS π
-helpβ shows you a summary of all the options. the little cheat sheet. slay.-hexβ turns on hex format, and it works both ways: output when you're generating a prime, and input when you're doing primality checking. hex girlies rise π-inβ gives you file names that contain numbers, for primality checking. like, instead of typing the numbers, you point at a file. so convenient fr fr.-generateβ generate a prime number. that's it, that's the flag β¨-bits numβ generates a prime withnumbits. so you pick how chunky it is πͺ-safeβ okay so this one only does anything when you use it with-generate, and it generates a "safe" prime. and here's how you check that: if the number generated isn, then it also checks that"(n-1)/2"is prime too. both prime. double prime. no cap π-provider name-provider-path path-provparam [name:]key=value-propquery propq
these four are all provider things β go read "Provider Options" in openssl(1), provider(7), and property(7). they said it better than I could, and I'm not about to make stuff up π
-checks numβ okay bestie don't get excited, this parameter is ignored. like, completely. it's giving vestigial. it's there, it does nothing, we move on π¦
heads up: -checks num genuinely does nothing. don't be out here thinking you can crank up the checks. it is ignored. periodt.
π COPYRIGHT π
Copyright 2017-2025 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
and that's the whole page bestie π this was OpenSSL 4.0.3, dated 2026-09-29, straight from OPENSSL-PRIME(1SSL). go forth and compute primes responsibly π§π
π¦ where this page comes from
- ubuntu stonking: openssl 4.0.3-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms