signaturealgorithm.go 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package godicttls
  2. // Note: values in this file was used in TLS 1.2's signature_algorithms extension
  3. // in combination with the values in hashalgorithm.go.
  4. // signature_algorithms extension in TLS 1.3 uses values in signaturescheme.go
  5. // source: https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-16
  6. // last updated: March 2023
  7. const (
  8. SigAlg_anonymous uint8 = 0 // deprecated in TLS 1.3
  9. SigAlg_rsa uint8 = 1
  10. SigAlg_dsa uint8 = 2 // deprecated in TLS 1.3
  11. SigAlg_ecdsa uint8 = 3
  12. SigAlg_ed25519 uint8 = 7
  13. SigAlg_ed448 uint8 = 8
  14. SigAlg_gostr34102012_256 uint8 = 64 // value changed in TLS 1.3, to 0x0709-0x070C
  15. SigAlg_gostr34102012_512 uint8 = 65 // value changed in TLS 1.3, to 0x070D-0x070F
  16. )
  17. var DictSignatureAlgorithmValueIndexed = map[uint8]string{
  18. 0: "anonymous",
  19. 1: "rsa",
  20. 2: "dsa",
  21. 3: "ecdsa",
  22. 7: "ed25519",
  23. 8: "ed448",
  24. 64: "gostr34102012_256",
  25. 65: "gostr34102012_512",
  26. }
  27. var DictSignatureAlgorithmNameIndexed = map[string]uint8{
  28. "anonymous": 0,
  29. "rsa": 1,
  30. "dsa": 2,
  31. "ecdsa": 3,
  32. "ed25519": 7,
  33. "ed448": 8,
  34. "gostr34102012_256": 64,
  35. "gostr34102012_512": 65,
  36. }