hpavkey.1.html 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <?xml version='1.0' encoding='iso-8859-1'?>
  2. <!doctype html public '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
  3. <html xmlns='http://www.w3c.org/1999/xhtml' lang='en-us'>
  4. <head>
  5. <title>
  6. hpavkey.1
  7. </title>
  8. <meta http-equiv='content-type' content='text/html;iso-8859-1'/>
  9. <meta name='generator' content='motley-tools 1.9.4 13:40:33 Feb 18 2015'/>
  10. <meta name='author' content='cmaier@cmassoc.net'/>
  11. <meta name='robots' content='noindex,nofollow'/>
  12. <link href='toolkit.css' rel='stylesheet' type='text/css'/>
  13. </head>
  14. <body>
  15. <div class='headerlink'>
  16. [<a href='hpav.1.html' title=' hpav.1 '>PREV</a>]
  17. [<a href='toolkit.html' title=' Index '>HOME</a>]
  18. [<a href='hpavkeys.1.html' title=' hpavkeys.1 '>NEXT</a>]
  19. </div>
  20. <pre>
  21. hpavkey(1) Qualcomm Atheros Open Powerline Toolkit hpavkey(1)
  22. NAME
  23. hpavkey - HomePlug AV Key Generator
  24. SYNOPSIS
  25. hpavkey [options] phrase [phrase] [...]
  26. DESCRIPTION
  27. Convert one or more phrases to encrypted HomePlug AV keys. Phrases are read as command line arguments, converted to
  28. either Device Access Keys, Network Membership Keys or Network Identification Keys and printed on stdout. By default,
  29. only keys are printed, one key per line, but keys and phrases can both be printed, one pair per line.
  30. This program is part of the Qualcomm Atheros Powerline Toolkit. See the AMP man page for an overview and installation
  31. instructions.
  32. BACKGROUND
  33. HomePlug AV technology makes use of special 16-byte binary values, called &quot;keys&quot;, for various purposes such as identity
  34. and security. Three keys of interest to users are the Device Access Key (DAK), the Network Memership Key (NMK) and Net‐
  35. work Identification Key (NID). Their purpose is described in the HomePlug AV Specification.
  36. The HomePlug AV Specification explains how to generate 16-byte binary DAK, NMK and NID values using the SHA-256 algorithm
  37. to hash user-supplied ASCII strings, called &quot;pass phrases&quot; in the specification. HomePlug AV compliant pass phrases have
  38. from 12 to 64 7-bit ASCII character values in the range 0x20 to 0x7F. In some cases, a specified 8-byte salt is added to
  39. the pass phrase before computing the 32-byte hash value. In all cases, the computed hash is then rehashed a specified
  40. number of times to produce the final 32-byte value. The HomePlug AV key is the lower 16-bytes of that value.
  41. Keys can be any 16-byte binary value but binary values are difficult to remember. HomePlug AV applications, such as the
  42. Qualcomm Atheros Windows Device Manager, will ask users for a pass phrase that is converted to a 16-byte binary value
  43. using a known hashing algorithm. In principle, no two phrases will product the same key and it would be computationally
  44. expensive to derive the pass phrase given the key. Although HomePlug AV software deals directly with the key, users need
  45. only remember the pass phrase in order to reproduce the key.
  46. OPTIONS
  47. -D Uses HomePlug AV rules to compute Device Access Keys (DAK) from pass phrases read from file or stdin. A DAK is 16
  48. bytes expressed as 32 hexadecimal digits. This option over-rides any -M and -N options previously specified on
  49. the command line.
  50. -e Enforce HomePlug AV length and content rules for phrases. Non-compliant phrases are reported and ignored. Com‐
  51. pliant phrases are 12 to 64 7-bit ASCII characters in the range 0x20 (SP) through 0x7F (DEL). Essentially, this
  52. includes any character that can be typed on a standard US or UK keyboard, excluding horizontal tab (HT). Be aware
  53. that some command shells intercept and act on special characters instead of passing them to the application. In
  54. such cases, you may need to include meta characters.
  55. -L level
  56. Set security level. The security level is encoded into the NID. Level 0 enables pushbutton pairing. Level 1
  57. disables it. This option has no effect unless a NID is computed.
  58. -M Uses HomePlug AV rules to compute Network Membership Keys (NMK) from pass phrases read from file or stdin. An NMK
  59. is 16 bytes expressed as 32 hexadecimal digits. This option over-rides any -D or -N options previously specified
  60. on the command line.
  61. -N Uses HomePlug AV rules to compute Network Identification Keys (NID) from pass phrases read from file or stdin. A
  62. NID is 7 bytes expressed as 14 hexadecimal digits. This option over-rides any -D or -M options previously speci‐
  63. fied on the command line.
  64. -q Enable quiet mode which, for this application, has no effect.
  65. -v Enable verbose mode which, for this application, prints the pass phrase after each key.
  66. -?,--help
  67. Print program help summary on stdout. This option takes precedence over other options on the command line.
  68. -!,--version
  69. Print program version information on stdout. This option takes precedence over other options on the command line.
  70. Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
  71. the Linux Toolkit you are using.
  72. ARGUMENTS
  73. phrase A pass phrase to be converted to a DAK, NMK or NID. More than one pass phrase can be entered on the command line.
  74. Each phrase will be converted to the same type of key and printed in the order specified. Phrases that contain
  75. quotes or special delimiters should be enclosed in quotes or apostrophes. By default, phrases can be any length
  76. and contain any ASCII chracter except ASCII NUL. Use option -e to enforce HomePlug AV password character and
  77. length rules.
  78. EXAMPLES
  79. The following example prints the ordinary SHA256 key for the phrase, &quot;HomePlugAV0123&quot;, entered on the command line. An
  80. SHA key is 256 bits or 32 bytes expressed as 64 hexadecimal characters. SHA256 keys are the default output when no key
  81. type is specified. SHA256 is a public domain standard, not a HomePlug AV standard.
  82. # hpavkey HomePlugAV0123
  83. EA41A2383355FA7CA3B467DF0848A8EB9C41591BE53696C5F45DDAF621784F07
  84. The following example prints the DAK for the phrase, &quot;HomePlugAV0123&quot;, entered on the command line.
  85. # hpavkey -D HomePlugAV0123
  86. F084B4E8F6069FF1300C9BDB812367FF
  87. The following command prints the NMK, instead of the DAK, for the phrase entered on the command line. The ouput is dif‐
  88. ferent because the DAK and NMK are computed differently given the same pass phrase.
  89. # hpavkey -M HomePlugAV0123
  90. B59319D7E8157BA001B018669CCEE30D
  91. The following command prints the NMK for each phrase entered on the command line. Notice that spaces are legal and sig‐
  92. nificant. Phrases containing spaces must be enclosed in quotes.
  93. # hpavkey -M HomePlugAV0123 &quot;The quick brown fox jumped over the lazy dog.&quot;
  94. B59319D7E8157BA001B018669CCEE30D
  95. 56F3C7F539D4F8F5EEC00E63F11A8DEC
  96. The following command prints the NMK and pass phrase for each pass phrase entered on the command line because the verbose
  97. option is specified.
  98. # hpavkey -v -M HomePlugAV0123 &quot;The quick brown fox jumped over the lazy dog.&quot;
  99. B59319D7E8157BA001B018669CCEE30D HomePlugAV0123
  100. 56F3C7F539D4F8F5EEC00E63F11A8DEC The quick brown fox jumped over the lazy dog.
  101. hpavkey can be used to compute a key and pass it to another program as an argument. The modpib command shown below will
  102. edit file example.pib by replacing the DAK. The -D option expects a hexadecimal key so we can supply one from the phrase
  103. &quot;HomePlugAV0123&quot;.
  104. # modpid -D $(hpavkey -D HomePlugAV0123) example.pib
  105. TIPS&amp;TRICKS
  106. The following example illustrates an unusual case where the passwords start with dash (&quot;-&quot;). The program assumes that
  107. the dash is an option prefix which is incorrect in this case. An error occurs because option -H is illegal.
  108. # hpavkey -vM -HomePlugAV -HomePlugAV123
  109. hpavkey: Operation canceled: Option 'H' has no meaning
  110. one solution is to insert a double-dash (&quot;--&quot;) on the command line to indicate that no further options appear on the com‐
  111. mand line. We include option -v to display the passwords on output.
  112. # hpavkey -vM -- -HomePlugAV -HomePlugAV123
  113. 80B74B14E92A739AD41ACDC377451D1B -HomePlugAV
  114. 1A46BDE6F75209292FDFC4CCE4D19B4E -HomePlugAV123
  115. See the hpavkeys man page for yet another solution to this problem.
  116. REFERENCES
  117. See the HomePlug AV Specification for more information on encryption keys, pass phrases and hash algorithms used. See
  118. standard FIPS180-2 sec 5.3.2 for more information on SHA256 encoding.
  119. DISCLAIMER
  120. Qualcomm Atheros reserves the right to modify program names, functionality, input format or output format in future tool‐
  121. kit releases without any obligation to notify or compensate toolkit users.
  122. SEE ALSO
  123. hpavkeys(1), mac2pw(1), mac2pwd(1), rkey(1)
  124. CREDITS
  125. Charles Maier &lt;cmaier@qca.qualcomm.com&gt;
  126. open-plc-utils-0.0.3 Mar 2014 hpavkey(1)
  127. </pre>
  128. <div class='footerlink'>
  129. [<a href='hpav.1.html' title=' hpav.1 '>PREV</a>]
  130. [<a href='toolkit.html' title=' Index '>HOME</a>]
  131. [<a href='hpavkeys.1.html' title=' hpavkeys.1 '>NEXT</a>]
  132. </div>
  133. </body>
  134. </html>