Did you know ...
Search Documentation:
Predicate crypto_generate_prime/3
HOME
DOWNLOAD
SWI-Prolog
Sources/building
Docker images
Add-ons
Browse GIT
DOCUMENTATION
Manual
Packages
FAQ
Command line
PlDoc
Bluffers
▶
Prolog syntax
PceEmacs
HTML generation
License
Publications
Rev 7 Extensions
TUTORIALS
Beginner
▶
Getting started
Learn Prolog Now!
Simply Logical
Debugger
Development tools
Advanced
▶
Modules
Grammars (DCGs)
clp(fd)
Printing messages
PlDoc
Web applications
▶
Web applications
Let's Encrypt!
Pengines
Semantic web
▶
ClioPatria
RDF namespaces
Graphics
▶
XPCE
GUI options
Machine learning
▶
Probabilistic Logic Programming
External collections
▶
Meta level tutorials
For packagers
▶
Linux packages
COMMUNITY
Forum & mailing list
Blog
News
Report a bug
Submit a patch
Submit an add-on
Roadmap (on GitHub)
External links
Contributing
Code of Conduct
Contributors
SWI-Prolog items
COMMERCIAL
WIKI
Login
View changes
Sandbox
Wiki help
All tags
ext
ssl
ssl.pl -- Secure Socket Layer (SSL) library
crypto.pl -- Cryptography and authentication library
crypto_n_random_bytes/2
crypto_data_hash/3
crypto_file_hash/3
crypto_context_new/2
crypto_data_context/3
crypto_context_hash/2
crypto_open_hash_stream/3
crypto_stream_hash/2
crypto_password_hash/2
crypto_password_hash/3
crypto_data_hkdf/4
ecdsa_sign/4
ecdsa_verify/4
hex_bytes/2
rsa_private_decrypt/4
rsa_private_encrypt/4
rsa_public_decrypt/4
rsa_public_encrypt/4
rsa_sign/4
rsa_verify/4
crypto_data_decrypt/6
crypto_data_encrypt/6
crypto_modular_inverse/3
crypto_generate_prime/3
crypto_is_prime/2
crypto_name_curve/2
crypto_curve_order/2
crypto_curve_generator/2
crypto_curve_scalar_mult/4
saml.pl -- SAML Authentication
xmldsig.pl -- XML Digital signature
xmlenc.pl -- XML encryption library
crypto_generate_prime
(+N, -P, +Options)
is
det
Generate a prime
P
with at least
N
bits.
Options
is a list of options. Currently, the only supported option is:
safe
(Boolean)
If
Boolean
is
true
(default is
false
), then a
safe
prime is generated. This means that
P
is of the form 2*Q + 1 where Q is also prime.