Advertisement
robertbira

Italian Translation Report: Node.js [Part 43 - 1382 words]

Oct 12th, 2018
371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.05 KB | None | 0 0
  1. The class is a utility for verifying signatures.
  2. As a writable where written data is used to validate against the supplied signature, or
  3. depending on the validity of the signature for the data and public key.
  4. Verifies the provided data using the given and
  5. The argument can be either a string containing a PEM encoded object, which can be an RSA public key, a DSA public key, or an X.509 certificate, or an object with one or more of the following properties:
  6. The argument is the previously calculated signature for the data, in the which can be or
  7. module methods and properties
  8. An object containing commonly used constants for crypto and security related operations.
  9. The specific constants currently defined are described in Crypto Constants
  10. The default encoding to use for functions that can take either strings or
  11. The default value is, which makes methods default to objects.
  12. The mechanism is provided for backwards compatibility with legacy programs that expect to be the default encoding.
  13. New applications should expect the default to be
  14. This property is deprecated.
  15. Property for checking and controlling whether a FIPS compliant crypto provider is currently in use. Setting to true requires a FIPS build of Node.js.
  16. Please use and instead.
  17. Creates and returns a object that uses the given and
  18. The argument controls stream behavior and is optional except when a cipher in CCM mode is used
  19. In that case, the option is required and specifies the length of the authentication tag in bytes, see CCM mode.
  20. The is dependent on OpenSSL, examples are, etc.
  21. On recent OpenSSL releases, ( for older versions of OpenSSL) will display the available cipher algorithms.
  22. The is used to derive the cipher key and initialization vector (IV).
  23. The value must be either a encoded string
  24. The implementation of derives keys using the OpenSSL function with the digest algorithm set to MD5, one iteration, and no salt.
  25. The lack of salt allows dictionary attacks as the same password always creates the same key.
  26. The low iteration count and non-cryptographically secure hash algorithm allow passwords to be tested very rapidly.
  27. In line with OpenSSL's recommendation to use instead of it is recommended that developers derive a key and IV on their own using and to use to create the object.
  28. Users should not use ciphers with counter mode in
  29. A warning is emitted when they are used in order to avoid the risk of IV reuse that causes vulnerabilities.
  30. For the case when IV is reused in GCM, see Nonce-Disrespecting Adversaries for details.
  31. The is the raw key used by the and is an initialization vector
  32. Both arguments must be encoded strings, or
  33. If the cipher does not need an initialization vector, may be
  34. Initialization vectors should be unpredictable and unique; ideally, they will be cryptographically random. They do not have to be secret: IVs are typically just added to ciphertext messages unencrypted. It may sound contradictory that something has to be unpredictable and unique, but does not have to be secret; it is important to remember that an attacker must not be able to predict ahead of time what a given IV will be.
  35. The method is a deprecated function for creating and returning a
  36. It should not be used.
  37. Replace it with which has the exact same arguments and return value.
  38. Returns a, as-if had been called.
  39. Creates a key exchange object using the supplied and an optional specific
  40. The argument can be a number, string, or
  41. If is not specified, the value is used.
  42. The and arguments can be or
  43. Creates a key exchange object and generates a prime of bits using an optional specific numeric
  44. Creates an Elliptic Curve Diffie-Hellman key exchange object using a predefined curve specified by the string.
  45. Creates and returns a object that can be used to generate hash digests using the given
  46. Optional argument controls stream behavior.
  47. Example: generating the sum of a file
  48. Use to obtain an array of names of the available signing algorithms.
  49. An array with the names of the supported cipher algorithms.
  50. An array with the names of the supported elliptic curves.
  51. The supported groups are: (defined in but see Caveats) and (defined in).
  52. The returned object mimics the interface of objects created by but will not allow changing the keys (with for example).
  53. The advantage of using this method is that the parties do not have to generate nor exchange a group modulus beforehand, saving both processor and communication time.
  54. if and only if a FIPS compliant crypto provider is currently in use.
  55. An array of the names of the supported hash algorithms, such as
  56. Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2) implementation.
  57. A selected HMAC digest algorithm specified by is applied to derive a key of the requested byte length from the and
  58. The supplied function is called with two arguments: and
  59. If an error occurs while deriving the key, will be set; otherwise will be
  60. By default, the successfully generated will be passed to the callback as a
  61. An error will be thrown if any of the input arguments specify invalid values or types.
  62. The argument must be a number set as high as possible.
  63. The higher the number of iterations, the more secure the derived key will be, but will take a longer amount of time to complete.
  64. The should also be as unique as possible.
  65. It is recommended that the salts are random and their lengths are at least 16 bytes.
  66. See for details.
  67. The property can be used to change the way the is passed to the callback.
  68. This property, however, has been deprecated and use should be avoided.
  69. An array of supported digest functions can be retrieved using
  70. Note that this API uses libuv's threadpool, which can have surprising and negative performance implications for some applications, see the documentation for more information.
  71. If is a string, it is treated as the key with no passphrase and will use
  72. Because RSA public keys can be derived from private keys, a private key may be passed instead of a public key.
  73. Encrypts the content of with and returns a new with encrypted content.
  74. Generates cryptographically strong pseudo-random data.
  75. The argument is a number indicating the number of bytes to generate.
  76. If a function is provided, the bytes are generated asynchronously and the function is invoked with two arguments: and
  77. The argument is a containing the generated bytes.
  78. If the function is not provided, the random bytes are generated synchronously and returned as a
  79. An error will be thrown if there is a problem generating the bytes.
  80. The method will not complete until there is sufficient entropy available.
  81. This should normally never take longer than a few milliseconds.
  82. The only time when generating the random bytes may conceivably block for a longer period of time is right after boot, when the whole system is still low on entropy
  83. The asynchronous version of is carried out in a single threadpool request.
  84. To minimize threadpool task length variation, partition large requests when doing so as part of fulfilling a client request.
  85. Must be supplied.
  86. Synchronous version of
  87. The above is equivalent to the following:
  88. Any or instance may be passed as
  89. This function is similar to but requires the first argument to be a that will be filled.
  90. It also requires that a callback is passed in.
  91. Load and set the for some or all OpenSSL functions (selected by flags).
  92. could be either an id or a path to the engine's shared library.
  93. The optional argument uses by default.
  94. The is a bit field taking one of or a mix of the following flags (defined in
  95. The flags below are deprecated in
  96. to enable FIPS mode
  97. Enables the FIPS compliant crypto provider in a FIPS-enabled Node.js build. Throws an error if FIPS mode is not available.
  98. This function is based on a constant-time algorithm.
  99. Returns true if is equal to, without leaking timing information that would allow an attacker to guess one of the values.
  100. This is suitable for comparing HMAC digests or secret values like authentication cookies or capability urls.
  101. must both be or and they must have the same length.
  102. Use of does not guarantee that the surrounding code is timing-safe.
  103. Care should be taken to ensure that the surrounding code does not introduce timing vulnerabilities.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement