glossary.rst 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. Glossary
  2. ========
  3. .. glossary::
  4. :sorted:
  5. plaintext
  6. User-readable data you care about.
  7. ciphertext
  8. The encoded data, it's not user readable. Potential attackers are able
  9. to see this.
  10. encryption
  11. The process of converting plaintext to ciphertext.
  12. decryption
  13. The process of converting ciphertext to plaintext.
  14. key
  15. Secret data is encoded with a function using this key. Sometimes
  16. multiple keys are used. These **must** be kept secret, if a key is
  17. exposed to an attacker, any data encrypted with it will be exposed.
  18. symmetric cryptography
  19. Cryptographic operations where encryption and decryption use the same
  20. key.
  21. public-key cryptography
  22. asymmetric cryptography
  23. Cryptographic operations where encryption and decryption use different
  24. keys. There are separate encryption and decryption keys. Typically
  25. encryption is performed using a :term:`public key`, and it can then be
  26. decrypted using a :term:`private key`. Asymmetric cryptography can also
  27. be used to create signatures, which can be generated with a
  28. :term:`private key` and verified with a :term:`public key`.
  29. public key
  30. This is one of two keys involved in :term:`public-key cryptography`. It
  31. can be used to encrypt messages for someone possessing the
  32. corresponding :term:`private key` and to verify signatures created with
  33. the corresponding :term:`private key`. This can be distributed
  34. publicly, hence the name.
  35. private key
  36. This is one of two keys involved in :term:`public-key cryptography`. It
  37. can be used to decrypt messages which were encrypted with the
  38. corresponding :term:`public key`, as well as to create signatures,
  39. which can be verified with the corresponding :term:`public key`. These
  40. **must** be kept secret, if they are exposed, all encrypted messages
  41. are compromised, and an attacker will be able to forge signatures.
  42. authentication
  43. The process of verifying that a message was created by a specific
  44. individual (or program). Like encryption, authentication can be either
  45. symmetric or asymmetric. Authentication is necessary for effective
  46. encryption.
  47. ciphertext indistinguishability
  48. This is a property of encryption systems whereby two encrypted messages
  49. aren't distinguishable without knowing the encryption key. This is
  50. considered a basic, necessary property for a working encryption system.
  51. text
  52. This type corresponds to ``unicode`` on Python 2 and ``str`` on Python
  53. 3. This is equivalent to ``six.text_type``.
  54. nonce
  55. A nonce is a **n**\ umber used **once**. Nonces are used in many
  56. cryptographic protocols. Generally, a nonce does not have to be secret
  57. or unpredictable, but it must be unique. A nonce is often a random
  58. or pseudo-random number (see :doc:`Random number generation
  59. </random-numbers>`). Since a nonce does not have to be unpredictable,
  60. it can also take a form of a counter.
  61. opaque key
  62. An opaque key is a type of key that allows you to perform cryptographic
  63. operations such as encryption, decryption, signing, and verification,
  64. but does not allow access to the key itself. Typically an opaque key is
  65. loaded from a `hardware security module`_ (HSM).
  66. A-label
  67. The ASCII compatible encoded (ACE) representation of an
  68. internationalized (unicode) domain name. A-labels begin with the
  69. prefix ``xn--``. To create an A-label from a unicode domain string use
  70. a library like `idna`_.
  71. bits
  72. A bit is binary value -- a value that has only two possible states.
  73. Typically binary values are represented visually as 0 or 1, but
  74. remember that their actual value is not a printable character. A byte
  75. on modern computers is 8 bits and represents 256 possible values. In
  76. cryptographic applications when you see something say it requires a 128
  77. bit key, you can calculate the number of bytes by dividing by 8. 128
  78. divided by 8 is 16, so a 128 bit key is a 16 byte key.
  79. bytes-like
  80. A bytes-like object contains binary data and supports the
  81. `buffer protocol`_. This includes ``bytes``, ``bytearray``, and
  82. ``memoryview`` objects.
  83. U-label
  84. The presentational unicode form of an internationalized domain
  85. name. U-labels use unicode characters outside the ASCII range and
  86. are encoded as A-labels when stored in certificates.
  87. .. _`hardware security module`: https://en.wikipedia.org/wiki/Hardware_security_module
  88. .. _`idna`: https://pypi.org/project/idna/
  89. .. _`buffer protocol`: https://docs.python.org/3/c-api/buffer.html