• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

3.9 Number theory
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog SSL Interface
        • library(crypto): Cryptography and authentication library
          • Number theory
            • crypto_modular_inverse/3
            • crypto_generate_prime/3
            • crypto_is_prime/2
Availability::- use_module(library(crypto)).(can be autoloaded)
Source[det]crypto_generate_prime(+N, -P, +Options)
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.
ClioPatria (version V3.1.1-51-ga0b30a5)