Guest User

Untitled

a guest
Feb 16th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.64 KB | None | 0 0
  1. dd if=/dev/zero of=LUKS-HEADER bs=1M count=2
  2. cryptsetup luksFormat /dev/sdb1 --header LUKS-HEADER --align-payload=0
  3.  
  4. # cryptsetup luksDump /dev/sdb2
  5. LUKS header information for /dev/sdb2
  6.  
  7. Version: 1
  8. Cipher name: aes
  9. Cipher mode: cbc-essiv:sha256
  10. Hash spec: sha1
  11. Payload offset: 4096
  12. MK bits: 256
  13. MK digest: e5 88 07 f2 4b ce 79 21 85 34 f7 a6 e3 0b 6b b2 a7 b8 d5 a1
  14. MK salt: 0c dd 95 3d 1e 30 1f 66 d4 5e 31 03 12 a0 61 29
  15. e5 ef 34 8e 13 5d 80 76 8b 4a 0a c3 55 02 22 d3
  16. MK iterations: 5750
  17. UUID: e4971160-047b-49ce-8246-b63f1fb67db9
  18.  
  19. Key Slot 0: ENABLED
  20. Iterations: 23233
  21. Salt: ff bc fc 78 98 5d 35 50 97 76 37 b4 70 99 38 44
  22. 9f bd a1 b9 02 2d 4d 1d 18 b5 dc f6 4c a0 37 fc
  23. Key material offset: 8
  24. AF stripes: 4000
  25. Key Slot 1: ENABLED
  26. Iterations: 23956
  27. Salt: 3a a0 06 83 d3 e0 ba da b0 5c e2 56 cb ed 72 69
  28. 76 9a 8a b8 e1 eb e6 90 44 b3 71 7a 2f 96 80 39
  29. Key material offset: 264
  30. AF stripes: 4000
  31. Key Slot 2: DISABLED
  32. Key Slot 3: DISABLED
  33. Key Slot 4: DISABLED
  34. Key Slot 5: DISABLED
  35. Key Slot 6: DISABLED
  36. Key Slot 7: DISABLED
  37.  
  38. +------------------------+----+----+----+----+----+----+----+----+-----------+
  39. | Luks Partition Header | K0 | K1 | K2 | K3 | K4 | K5 | K6 | K7 | BULK DATA |
  40. +------------------------+----+----+----+----+----+----+----+----+-----------+
  41. Figure - 1
  42.  
  43. -------------------------------+-----------------------------
  44. | Partition Header Contents | Output by luksDump |
  45. -------------------------------+-----------------------------
  46. | Magic Byte | LUKS |
  47. -------------------------------+-----------------------------
  48. | Luks version | 1 |
  49. -------------------------------+-----------------------------
  50. | Cipher Name | serpent |
  51. -------------------------------+-----------------------------
  52. | Cipher Mode | xts-plain64 |
  53. -------------------------------+-----------------------------
  54. | Hash Type | whirpool |
  55. -------------------------------+-----------------------------
  56. | Payload offset | 4096 |
  57. -------------------------------+-----------------------------
  58. | Master Key Bits | 512 |
  59. -------------------------------+-----------------------------
  60. | Master Key Digest | 8a 90 77 7e ... |
  61. -------------------------------+-----------------------------
  62. | Master Key Salt | ca f3 40 fc ... |
  63. -------------------------------+-----------------------------
  64. | Master Key Digest Iteration | 23250 |
  65. -------------------------------+-----------------------------
  66. | Partition UUID | 46927c7d-7f17-4312-... |
  67. -------------------------------+-----------------------------
  68. Table - 1
  69.  
  70. ------------------------------+------------------------------
  71. | Key Descriptors | Output by luksDump |
  72. +-----------------------------+------------------------------
  73. | Activation status | Enabled |
  74. +-----------------------------+------------------------------
  75. | Iteration | 146285 |
  76. +-----------------------------+------------------------------
  77. | Salt | 1e c1 94 24 36 4c 98.. |
  78. +-----------------------------+------------------------------
  79. | Key Material Offset | 8 |
  80. +-----------------------------+------------------------------
  81. | AF Stripes | 4000 |
  82. ------------------------------+------------------------------
  83. Table - 2
  84.  
  85. [root@arif tmp]# hexdump -C /dev/sda99 -s 0X1FFFa0 | head
  86. 001fffa0 31 62 33 33 66 30 30 20 72 20 5f 5f 6b 63 72 63 |1b33f00 r __kcrc|
  87. 001fffb0 74 61 62 5f 64 6d 61 6d 5f 61 6c 6c 6f 63 5f 63 |tab_dmam_alloc_c|
  88. 001fffc0 6f 68 65 72 65 6e 74 0a 66 66 66 66 66 66 66 66 |oherent.ffffffff|
  89. 001fffd0 38 31 62 33 33 66 30 38 20 72 20 5f 5f 6b 63 72 |81b33f08 r __kcr|
  90. 001fffe0 63 74 61 62 5f 64 6d 61 6d 5f 61 6c 6c 6f 63 5f |ctab_dmam_alloc_|
  91. 001ffff0 6e 6f 6e 63 6f 68 65 72 65 6e 74 0a 66 66 66 66 |noncoherent.ffff|
  92. 00200000 89 8d 9f 65 56 c0 f9 07 65 d8 50 58 18 3a 67 31 |...eV...e.PX.:g1|
  93. 00200010 87 c7 7c 2e 4a 3e 40 78 08 10 2c e3 14 52 5f dc |..|.J>@x..,..R_.|
  94. 00200020 c9 7e 1e d3 a1 4d 4f fd 4c 6c f8 fb f2 bd 46 48 |.~...MO.Ll....FH|
  95. 00200030 3f e9 f8 4b ef f7 1c 82 be 7e 91 e0 78 35 aa bb |?..K.....~..x5..|
  96.  
  97. [arif@arif ~]$ lsblk
  98. NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
  99. sda 8:0 0 931.5G 0 disk
  100. ├─sda1 8:1 0 1.9G 0 part /boot/efi
  101. ├─sda2 8:2 0 953M 0 part /boot
  102. ├─sda3 8:3 0 614.7G 0 part
  103. │ └─luks-d84cd751-7f17-4312-ed89-4dfbc33dec61
  104. 253:0 0 614.7G 0 crypt
  105. │ ├─vg1-root 253:2 0 139.7G 0 lvm /
  106. │ ├─vg1-usr 253:3 0 186.3G 0 lvm
  107. │ │ └─luks-03833316-8f82-4a78-0fc4-85ed66ffccd5
  108. 253:4 0 186.3G 0 crypt /usr
  109. │ ├─vg1-home 253:5 0 186.3G 0 lvm
  110. │ │ └─luks-65f51991-7437-460b-9a0b-e3851b32fdb4
  111. 253:8 0 186.3G 0 crypt /home
  112. │ ├─vg1-var 253:6 0 93.1G 0 lvm
  113. │ │ └─luks-d1b24b22-53eb-477f-8259-0a22846d3edc
  114. 253:9 0 93.1G 0 crypt /var
  115. │ └─vg1-tmp 253:7 0 9.3G 0 lvm
  116. │ └─luks-b69a98b8-e257-5ca7-80a4-21725a721f00
  117. 253:10 0 9.3G 0 crypt /tmp
  118. ├─sda4 8:4 0 14G 0 part
  119. │ └─luks-9bbcad99-3532-4583-a428-c02b559fdf3c
  120. 253:1 0 14G 0 crypt [SWAP]
  121. └─sda5 8:5 0 300.1G 0 part
  122. └─storage
Add Comment
Please, Sign In to add comment