×
1 Choose EITC/EITCA Certificates
2 Learn and take online exams
3 Get your IT skills certified

Confirm your IT skills and competencies under the European IT Certification framework from anywhere in the world fully online.

EITCA Academy

Digital skills attestation standard by the European IT Certification Institute aiming to support Digital Society development

LOG IN TO YOUR ACCOUNT

CREATE AN ACCOUNT FORGOT YOUR PASSWORD?

FORGOT YOUR PASSWORD?

AAH, WAIT, I REMEMBER NOW!

CREATE AN ACCOUNT

ALREADY HAVE AN ACCOUNT?
EUROPEAN INFORMATION TECHNOLOGIES CERTIFICATION ACADEMY - ATTESTING YOUR PROFESSIONAL DIGITAL SKILLS
  • SIGN UP
  • LOGIN
  • INFO

EITCA Academy

EITCA Academy

The European Information Technologies Certification Institute - EITCI ASBL

Certification Provider

EITCI Institute ASBL

Brussels, European Union

Governing European IT Certification (EITC) framework in support of the IT professionalism and Digital Society

  • CERTIFICATES
    • EITCA ACADEMIES
      • EITCA ACADEMIES CATALOGUE<
      • EITCA/CG COMPUTER GRAPHICS
      • EITCA/IS INFORMATION SECURITY
      • EITCA/BI BUSINESS INFORMATION
      • EITCA/KC KEY COMPETENCIES
      • EITCA/EG E-GOVERNMENT
      • EITCA/WD WEB DEVELOPMENT
      • EITCA/AI ARTIFICIAL INTELLIGENCE
    • EITC CERTIFICATES
      • EITC CERTIFICATES CATALOGUE<
      • COMPUTER GRAPHICS CERTIFICATES
      • WEB DESIGN CERTIFICATES
      • 3D DESIGN CERTIFICATES
      • OFFICE IT CERTIFICATES
      • BITCOIN BLOCKCHAIN CERTIFICATE
      • WORDPRESS CERTIFICATE
      • CLOUD PLATFORM CERTIFICATENEW
    • EITC CERTIFICATES
      • INTERNET CERTIFICATES
      • CRYPTOGRAPHY CERTIFICATES
      • BUSINESS IT CERTIFICATES
      • TELEWORK CERTIFICATES
      • PROGRAMMING CERTIFICATES
      • DIGITAL PORTRAIT CERTIFICATE
      • WEB DEVELOPMENT CERTIFICATES
      • DEEP LEARNING CERTIFICATESNEW
    • CERTIFICATES FOR
      • EU PUBLIC ADMINISTRATION
      • TEACHERS AND EDUCATORS
      • IT SECURITY PROFESSIONALS
      • GRAPHICS DESIGNERS & ARTISTS
      • BUSINESSMEN AND MANAGERS
      • BLOCKCHAIN DEVELOPERS
      • WEB DEVELOPERS
      • CLOUD AI EXPERTSNEW
  • FEATURED
  • SUBSIDY
  • HOW IT WORKS
  •   IT ID
  • ABOUT
  • CONTACT
  • MY ORDER
    Your current order is empty.
EITCIINSTITUTE
CERTIFIED

Are CSPRNGs non deterministic?

by Emmanuel Udofia / Monday, 05 August 2024 / Published in Cybersecurity, EITC/IS/CCF Classical Cryptography Fundamentals, Stream ciphers, Stream ciphers, random numbers and the one-time pad

Cryptographically Secure Pseudorandom Number Generators (CSPRNGs) are a critical component in the field of cybersecurity, particularly within the realms of classical cryptography and stream ciphers. To address the question of whether CSPRNGs are non-deterministic, it is essential to consider the definitions, functions, and characteristics of CSPRNGs, as well as their distinction from true random number generators (TRNGs).

A CSPRNG is designed to generate sequences of numbers that approximate the properties of random numbers. However, unlike true random number generators, which derive randomness from physical processes, CSPRNGs are algorithmic and deterministic by nature. This deterministic property means that if the initial seed value and the algorithm are known, the entire sequence of numbers generated by the CSPRNG can be predicted and reproduced.

The primary purpose of a CSPRNG is to produce output that is indistinguishable from true randomness to any efficient statistical test. This property is important for cryptographic applications where predictability could lead to vulnerabilities. Despite their deterministic nature, CSPRNGs are constructed to be computationally infeasible to predict without knowledge of the seed.

To illustrate this concept, consider an example of a CSPRNG based on a cryptographic hash function. Suppose we use a well-known hash function like SHA-256 to generate pseudorandom numbers. The process might involve taking an initial seed value, hashing it to produce the first pseudorandom number, and then using this output as the seed for the next iteration. The sequence generated by this method is deterministic, as the same initial seed and hash function will always produce the same sequence. However, without knowledge of the initial seed, it becomes computationally infeasible to predict future values in the sequence, assuming the hash function is cryptographically secure.

The deterministic nature of CSPRNGs does not detract from their utility or security, provided that the seed is kept secret. In practice, securely generating and managing the seed is paramount. For instance, seeds can be derived from high-entropy sources such as TRNGs, which leverage physical phenomena like electronic noise, radioactive decay, or other quantum processes to produce truly random values. Once a secure seed is obtained, a CSPRNG can generate a vast sequence of pseudorandom numbers that can be used for various cryptographic purposes, such as key generation, initialization vectors, and nonces.

A noteworthy property of CSPRNGs is their resistance to "state compromise extensions." This means that even if an adversary learns part of the internal state of the CSPRNG, they should not be able to reconstruct past outputs or predict future outputs. This property is essential for maintaining the security of cryptographic protocols that rely on pseudorandom numbers.

To further elucidate the distinction between CSPRNGs and TRNGs, consider the one-time pad (OTP) encryption scheme. The OTP requires a key that is as long as the message to be encrypted and is used only once. For the OTP to be perfectly secure, the key must be truly random, which necessitates the use of a TRNG. In contrast, if a CSPRNG were used to generate the key, the deterministic nature of the CSPRNG could potentially compromise the security of the OTP if the seed were discovered.

In the context of stream ciphers, CSPRNGs are often employed to generate keystreams. A stream cipher encrypts plaintext by combining it with a pseudorandom keystream generated by the CSPRNG. The security of the stream cipher hinges on the unpredictability of the keystream, which, in turn, depends on the security of the CSPRNG and the secrecy of its seed. Examples of stream ciphers that utilize CSPRNGs include RC4, Salsa20, and ChaCha20.

The RC4 stream cipher, for instance, initializes its internal state with a key-scheduling algorithm (KSA) that takes a secret key as input. The KSA permutes an internal state array based on the key, and the permutation is then used to generate the pseudorandom keystream during the encryption process. The keystream generated by RC4 is deterministic, as it is entirely dependent on the initial key. However, the security of RC4 relies on the difficulty of determining the key from the keystream.

Salsa20 and ChaCha20 are modern stream ciphers that also utilize CSPRNG principles. These ciphers initialize their internal state with a key and a nonce, and then apply a series of cryptographic transformations to produce the keystream. The resulting keystream is deterministic, but without knowledge of the key and nonce, it is computationally infeasible to predict or reproduce.

While CSPRNGs are inherently deterministic, their design ensures that their output is indistinguishable from true randomness to any efficient statistical test, provided the seed remains secret. This deterministic property does not undermine their utility in cryptographic applications, as the computational infeasibility of predicting the output without the seed ensures their security. The distinction between CSPRNGs and TRNGs is important, with the latter being necessary for applications requiring true randomness, such as the one-time pad, and the former being suitable for generating pseudorandom sequences for stream ciphers and other cryptographic protocols.

Other recent questions and answers regarding Stream ciphers, random numbers and the one-time pad:

  • Are quantum random numbers generators the only real nondeterministic random numbers generators?
  • Do practical stream ciphers distribute the truly random key?
  • What are initialization vectors?
  • How can stream ciphers encrypt individual bit?
  • What is a stream cipher using a truely random key binary sequence
  • Do practical stream ciphers generate their keys with psuedo random number generators?
  • What is the CSPRNG unpredictability based on?
  • What are the key differences between True Random Number Generators (TRNGs), Pseudorandom Number Generators (PRNGs), and Cryptographically Secure Pseudorandom Number Generators (CSPRNGs)?
  • How does the Global System for Mobile Communications (GSM) utilize stream ciphers to secure voice data during transmission?
  • What makes the one-time pad theoretically unbreakable, and what are the practical challenges associated with its use?

View more questions and answers in Stream ciphers, random numbers and the one-time pad

More questions and answers:

  • Field: Cybersecurity
  • Programme: EITC/IS/CCF Classical Cryptography Fundamentals (go to the certification programme)
  • Lesson: Stream ciphers (go to related lesson)
  • Topic: Stream ciphers, random numbers and the one-time pad (go to related topic)
Tagged under: Cryptographic Security, CSPRNG, Cybersecurity, Deterministic, Stream Ciphers, True Random Number Generators
Home » Cybersecurity » EITC/IS/CCF Classical Cryptography Fundamentals » Stream ciphers » Stream ciphers, random numbers and the one-time pad » » Are CSPRNGs non deterministic?

Certification Center

USER MENU

  • My Account

CERTIFICATE CATEGORY

  • EITC Certification (117)
  • EITCA Certification (9)

What are you looking for?

  • Introduction
  • How it works?
  • EITCA Academies
  • EITCI DSJC Subsidy
  • Full EITC catalogue
  • Your order
  • Featured
  •   IT ID
  • EITCA reviews (Medium publ.)
  • About
  • Contact

EITCA Academy is a part of the European IT Certification framework

The European IT Certification framework has been established in 2008 as a Europe based and vendor independent standard in widely accessible online certification of digital skills and competencies in many areas of professional digital specializations. The EITC framework is governed by the European IT Certification Institute (EITCI), a non-profit certification authority supporting information society growth and bridging the digital skills gap in the EU.
Eligibility for EITCA Academy 90% EITCI DSJC Subsidy support
90% of EITCA Academy fees subsidized in enrolment

    EITCA Academy Secretary Office

    European IT Certification Institute ASBL
    Brussels, Belgium, European Union

    EITC / EITCA Certification Framework Operator
    Governing European IT Certification Standard
    Access contact form or call +32 25887351

    Follow EITCI on X
    Visit EITCA Academy on Facebook
    Engage with EITCA Academy on LinkedIn
    Check out EITCI and EITCA videos on YouTube

    Funded by the European Union

    Funded by the European Regional Development Fund (ERDF) and the European Social Fund (ESF) in series of projects since 2007, currently governed by the European IT Certification Institute (EITCI) since 2008

    Information Security Policy | DSRRM and GDPR Policy | Data Protection Policy | Record of Processing Activities | HSE Policy | Anti-Corruption Policy | Modern Slavery Policy

    Automatically translate to your language

    Terms and Conditions | Privacy Policy
    EITCA Academy
    • EITCA Academy on social media
    EITCA Academy


    © 2008-2026  European IT Certification Institute
    Brussels, Belgium, European Union

    TOP

    We care about your privacy

    EITCI uses cookies and similar technologies to keep this site secure, remember your choices, provide personalized experience, measure the traffic, serve more relevant content and certification programmes. You can accept all cookies or customize your preferences. Cookies are variables used to store website specific information on your device to facilitate processing of data for personalized website visit, such as login to your account, accessing the programmes, placing enrolment orders in chosen programmes and improving your EITC certification journey. You can change or withdraw your consent at any time by clicking the Consent Preferences button at the left-bottom of your screen. We respect your choices and are committed to providing you with a transparent and secure browsing experience, which may be limited when cookies aren't accepted. For more details refer to the Privacy Policy
    Customize Consent Preferences
    We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.
    The cookies categorized as Necessary are stored on your browser as they are essential for enabling the basic functionalities of the site.
    To learn more about how Google processes personal information, visit: Google privacy policy

    Necessary

    Always Active

    Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

    Functional

    Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

    Preferences

    Stores personalization choices such as interface preferences.

    External media and social features

    Allows embedded video, social, chat, and external interactive services that may set their own cookies. Keep off until the user chooses these features.

    Analytics

    Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

    Marketing and conversions

    Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

    CHAT WITH SUPPORT
    Do you have any questions?
    Attach files with the paperclip or paste screenshots into the message box (Ctrl+V). Max 5 file(s), 10 MB each.
    We will reply here and by email. Your conversation is tracked with a support token.