Skip to content

Too few rounds of PBKDF2 when encrypting master key with password #184

Closed
@jspilman

Description

@jspilman

Looks like you are using 100 rounds of PKCS#5 - PBKDF2 here:

private static SecretKey getKeyFromPassphrase(String passphrase, byte[] salt) {
PBEKeySpec keyspec = new PBEKeySpec(passphrase.toCharArray(), salt, 100);
SecretKeyFactory skf = SecretKeyFactory.getInstance("PBEWITHSHA1AND128BITAES-CBC-BC");
return skf.generateSecret(keyspec);
}

Shouldn't this be at least 10,000? At least for devices released in the last few years?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions