hpavkeys.1.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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. hpavkeys.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='hpavkey.1.html' title=' hpavkey.1 '>PREV</a>]
  17. [<a href='toolkit.html' title=' Index '>HOME</a>]
  18. [<a href='int64host.1.html' title=' int64host.1 '>NEXT</a>]
  19. </div>
  20. <pre>
  21. hpavkeys(1) Qualcomm Atheros Open Powerline Toolkit hpavkeys(1)
  22. NAME
  23. hpavkeys - HomePlug AV Key Generator
  24. SYNOPSIS
  25. hpavkeys [options] file [file] [...]
  26. DESCRIPTION
  27. Convert blocks of phrases to encrypted HomePlug AV keys. Phrases are read from one or more files, converted to either
  28. Device Access Keys, Networks Membership Keys or Network Identification Keys and printed on stdout. By default, only keys
  29. are printed, one per line, but both keys and phrases can 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 uses 16-byte binary values, called &quot;keys&quot;, for various purposes such as identity and security.
  34. Three keys of interest to users are the Device Access Key (DAK), the Network Memership Key (NMK) and Network Identifica‐
  35. tion 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 compliant applications,
  42. like the Qualcomm Atheros Device Manager, ask users for a pass phrase that is converted to a 16-byte binary value using a
  43. standard hashing algorithm. In principle, no two phrases will produce 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 characters. This option over-rides any -D or -N options previsously spec‐
  60. ified on the command line.
  61. -N Uses HomePlug AV rules to compute Network Identification Keys (NID) from pass phrases read from file or stdin. An
  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. -p Print the password, or pass phrase, used to generate each key after each key on stdout. One single space seper‐
  65. ates the pass phrase from the key string. The pass phrase consists of all subsequent characters, including spa‐
  66. ces, appearing up to the end of the line. Without this option, only the keys are printed.
  67. -q Enable quiet mode which, for this application, has no effect. This behavior has changed from earlier program ver‐
  68. sions.
  69. -v Enable verbose mode which, for this application, prints the input phrase after each key. This behavior has
  70. changed from earlier program versions.
  71. -?,--help
  72. Print program help summary on stdout. This option takes precedence over other options on the command line.
  73. -!,--version
  74. Print program version information on stdout. This option takes precedence over other options on the command line.
  75. Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
  76. the Linux Toolkit you are using.
  77. ARGUMENTS
  78. file Any valid filename. Each file on the command line is read in turn and output is written to stdout, much like the
  79. cat utility. Input is read from the console when no filenames are specified.
  80. EXAMPLES
  81. The following command reads file example.keys and prints the SHA256 key for each phrase in that file. An SHA256 key is
  82. 128 bits or 32 bytes expressed as 32 hexadecimal digits. SHA256 keys are the default output when no key type is speci‐
  83. fied. SHA256 is a public domain standard, not a HomePlug AV standard.
  84. # hpavkeys example.keys
  85. EA41A2383355FA7CA3B467DF0848A8EB9C41591BE53696C5F45DDAF621784F07
  86. 4E76AD8354461437C04EF9B9B242540B6406D782FF2C3FB28AFDAB5B423F88FE
  87. 71C480DF93D6AE2F1EFAD1447C66C9525E316218CF51FC8D9ED832F2DAF18B73
  88. 7257DF11A035A49119FD881F20AA7FE88970F1A034E4BBBF2D50FAB0D0239F25
  89. FAC202F439E47EB5EACF6B9CC4151BF6B2B6E736A79BCAB0F589C63BCB78D16B
  90. The following command reads file example.keys and prints the DAK for each phrase in that file. Input phrases are checked
  91. for HomePlugAV compliance and illegal phrases are reported then ignored. A legal HomePlug pass phrase is 12 to 64 char‐
  92. acters consisting of ASCII characters ' ' through '~'. Essentially, these are the only characters that one can enter on
  93. a standard English keyboard.
  94. # hpavkeys -D example.keys
  95. F084B4E8F6069FF1300C9BDB812367FF
  96. 7A6F36AC0DF1031CF04C5AF8DC0A70F0
  97. 910B3D08D309BCE66452DBB40FDCB551
  98. 309743236F0403C450A718494825FC02
  99. 3C94A168BDF4BC19AA111BAB930171A5
  100. 72D6E17E6756CD778F59FAFC6BF6D2B6
  101. 914EB1D58AB66461A27794BFF648C04F
  102. 7B7C094380A6E26F9F4618884C81DB63
  103. 08AE750B07884E2C380BDCEDBC28D2C8
  104. F8EE1AC7F4234A3F724D21F8B837B547
  105. The following example reads the same file as above but prints the NMK for each phrase, instead of the DAK. The keys
  106. printed here have different values because the HomePlug AV Specification requires different hash algorithms for the DAK
  107. and NMK. Don't mix them up.
  108. # hpavkeys -M example.keys
  109. B59319D7E8157BA001B018669CCEE30D
  110. F2B0C7F6C355981EBDD484FF49957420
  111. 54CB8AB1235896E45E6B643C7BF11ADB
  112. 75CD66973ED683E041F8AC37ACA88B58
  113. E20A0A69A3C6326C623202D3F42AF416
  114. 1671D61F305E81BAF000D58AF09888D5
  115. 05EFD9C9452BF8415D84BB1C415EE52A
  116. 56F3C7F539D4F8F5EEC00E63F11A8DEC
  117. 9718D29451897404DA2719CB80CA2ADA
  118. E5A7C020E0889A0265759D80DB3F9834
  119. The following command reads the same file as above but prints the pass phrase because the -v option is specified. Keys
  120. are printed as 32 hex digits then one space then the phrase. Spaces are significant within the phrase. Printed phrases
  121. start in column 34 and continue to the end of the line.
  122. # hpavkeys -M example.keys -v
  123. B59319D7E8157BA001B018669CCEE30D HomePlugAV0123
  124. F2B0C7F6C355981EBDD484FF49957420 01234567890123456789
  125. 54CB8AB1235896E45E6B643C7BF11ADB abcdefghijklmnopqrstuvwxyz
  126. 75CD66973ED683E041F8AC37ACA88B58 I love my dog .
  127. E20A0A69A3C6326C623202D3F42AF416 A.B.C.D.E.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z
  128. 1671D61F305E81BAF000D58AF09888D5 ~!@#$%^&amp;*()_-`{}[]&quot;:;'&lt;&gt;./?
  129. 05EFD9C9452BF8415D84BB1C415EE52A QWRT-YPSD-FGHJ-KLZX
  130. 56F3C7F539D4F8F5EEC00E63F11A8DEC The quick brown fox jumped over the lazy dog.
  131. 9718D29451897404DA2719CB80CA2ADA Super-Duper Electrosonic Frepitator SSEI43
  132. E5A7C020E0889A0265759D80DB3F9834 A = 3 * (5+2) - 1045
  133. TIPS&amp;TRICKS
  134. The following example illustrates an unusual case where passwords start with dash (&quot;-&quot;). Program hpavkey assumes that
  135. the dash is an option prefix which is incorrect in this case. An error occurs because option -H is illegal.
  136. # hpavkey -vM -HomePlugAV -HomePlugAV123
  137. hpavkey: Operation canceled: Option 'H' has no meaning
  138. One solution is to insert the keys verbatim in a password file, in this case password.txt, then run program hpavkeys on
  139. that file.
  140. # hpavkeys -vM password.txt
  141. 80B74B14E92A739AD41ACDC377451D1B -HomePlugAV
  142. 1A46BDE6F75209292FDFC4CCE4D19B4E -HomePlugAV123
  143. REFERENCES
  144. See the HomePlug AV Specification for more information on encryption keys, pass phrases and hash algorithms used. See
  145. standard FIPS180-2 sec 5.3.2 for more information on SHA256 encoding.
  146. DISCLAIMER
  147. Qualcomm Atheros reserves the right to modify program names, functionality, input format or output format in future tool‐
  148. kit releases without any obligation to notify or compensate toolkit users.
  149. SEE ALSO
  150. hpavkey(1), keys(1), mac2pw(1), mac2pwd(1), rkey(1)
  151. CREDITS
  152. Charles Maier &lt;cmaier@qca.qualcomm.com&gt;
  153. open-plc-utils-0.0.3 Mar 2014 hpavkeys(1)
  154. </pre>
  155. <div class='footerlink'>
  156. [<a href='hpavkey.1.html' title=' hpavkey.1 '>PREV</a>]
  157. [<a href='toolkit.html' title=' Index '>HOME</a>]
  158. [<a href='int64host.1.html' title=' int64host.1 '>NEXT</a>]
  159. </div>
  160. </body>
  161. </html>