4

When I create addresses in the API library (i.e., using getNewAddress()), there is an optional security parameter.

What does this parameter do, and what values does it accept?

todofixthis
  • 1,320
  • 8
  • 23

1 Answers1

4

It's the "Security level to be used for the private key / address. Can be 1, 2 or 3."

A security level determines the number of rounds for hashing, or in other words the length of the private key.

  • Security level 1 : key length 81 trits (security low)
  • Security level 2 : key length 162 trits (security medium)
  • Security level 3 : key length 243 trits (security high)

Related reading:

ben75
  • 5,344
  • 11
  • 32
  • I think this is not correct. The length of the private key is [security] * 2187 Trytes, as opposed to [security] * 81 Trits. Am I correct? – ralf Feb 23 '18 at 19:28