All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arno Wagner <arno@wagner.name>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] No key available with this passphrase
Date: Mon, 10 Jun 2013 22:55:32 +0200	[thread overview]
Message-ID: <20130610205531.GA12211@tansi.org> (raw)
In-Reply-To: <CABFzgH-5K4JXMac+kq+8SO9HJGN42QO6_TYRfxdJ1LMm+1gRWA@mail.gmail.com>

On Mon, Jun 10, 2013 at 11:40:52PM +0800, Packets wrote:
> Hi Guys,
> 
> I insert my encrypted usb flash drive and mount it on my ubuntu
> workstation. When it was mounted, I tried to format the usb fd using
> gparted gui but it did not succeed so I proceed in putting my data on the
> mounted usb fd. After putting all my data, I reformat the pc and when it
> boot up, I insert the encrypted usb fd. To my surprise, it is no longer
> accepting my passphrase (surprise!). I'm sure my passphrase is correct.
> 
> Could anyone on the list help me recover my files?  Here are some commands
> might be relevant to my problem
> 
> nelson@kazekage:~$ sudo cryptsetup luksOpen /dev/sdb1 test
> [sudo] password for nelson:
> Enter passphrase for /dev/sdb1:
> No key available with this passphrase.

So it is a LUKS device.

 
> ##################
> 
> nelson@kazekage:~$ sudo cryptsetup isLuks /dev/sdb1
> [sudo] password for nelson:
> nelson@kazekage:~$

This should be run with a "-v" if done interactively.
But your device is a LUKS device, therwise it would
not get as far as it does in luksOpen.

If the keyslot-checker does not find anything (and from what you
describe, it should probably not, just install the library of 
1.6.1 as well to get t working as Milan described), it is possible 
that you have a keymap or charset problem, see FAQ 
http://code.google.com/p/cryptsetup/wiki/FrequentlyAskedQuestions
item 1.2. This can happen, for example, when your old system used
some ASCII-Extension, and the new one uses UTF-8 (or the other
way round). The gist of it is that you can have characters
that look exatly the same on-screen, but are represented 
differently in binary, for the case of UTF-8 even with 
several bytes instead of the one ASCII byte. This can
happen for all characters not in 7 bit ASCII 
(http://en.wikipedia.org/wiki/ASCII). For example, a German
u-Umlaut (&uuml; in HTML) is 0xfc in ISO/IEC 8859-1,
but 0xc3 0xbc in UTF-8. Thse do of course map to entirely
different binary passphrases.

If you suspect somethng like this happening, you can try to
change the default encoding. 

Or you can try create the right passphrase with a hex-editor
and have cryptsetup read it from file. There are some
details that matter, see the man-page. You may also want to try
it out wth a loop-mountes test LUKS container, see FAQ
item 2.4 on how to make one.
An UTF8 table is here:
   http://www.utf8-zeichentabelle.de/
and the ISO tables are here:
   http://de.wikipedia.org/wiki/ISO_8859-1

This problem has already bitten several people, hence
the warning in the FAQ. Debian (and derived distros
like Ubuntu, Mint, ...) has recently switched to UTF-8 
as default from the plder default ISO tables.

Arno

-- 
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: arno@wagner.name
GnuPG: ID: CB5D9718  FP: 12D6 C03B 1B30 33BB 13CF  B774 E35C 5FA1 CB5D 9718
----
There are two ways of constructing a software design: One way is to make it
so simple that there are obviously no deficiencies, and the other way is to
make it so complicated that there are no obvious deficiencies. The first
method is far more difficult.  --Tony Hoare

  parent reply	other threads:[~2013-06-10 20:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-10 15:40 [dm-crypt] No key available with this passphrase Packets
2013-06-10 15:42 ` Packets
2013-06-10 18:21   ` Milan Broz
2013-06-22  5:24     ` Packets
2013-06-22 10:32       ` Arno Wagner
2013-06-28 11:27         ` Packets
2013-06-10 20:55 ` Arno Wagner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-06-10 16:37 Ryan Delaney
2014-06-11  3:53 ` Arno Wagner
2017-04-29 18:27 Hammad Siddiqi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130610205531.GA12211@tansi.org \
    --to=arno@wagner.name \
    --cc=dm-crypt@saout.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.