Giter Club home page Giter Club logo

Comments (6)

cperciva avatar cperciva commented on July 22, 2024

See passphrase-time branch.

from tarsnap.

gperciva avatar gperciva commented on July 22, 2024

note to self: this is not aimed at 1.0.36.

from tarsnap.

gperciva avatar gperciva commented on July 22, 2024

So in lib/keyfile/keyfile.h, it says:

/**
 * keyfile_write(filename, machinenum, keys, passphrase, maxmem, cputime):
 * Write a key file for the specified machine containing the specified keys.
 * If passphrase is non-NULL, use up to cputime seconds and maxmem bytes of
 * memory to encrypt the key file.
 */
int keyfile_write(const char *, uint64_t, int, char *, size_t, double);

I'm not certain how to interpret "use up to" (in computing terms; obviously I understand the English).

With 8a3a352, I see this:

$ time ./tarsnap-keygen --keyfile keys-60.txt --user [email protected] --machine gin --passphrase-time 60 --passphrased
Enter tarsnap account password: 
Please enter passphrase for keyfile encryption: 
Please confirm passphrase for keyfile encryption: 

real    0m14.500s
user    0m8.607s
sys 0m0.051s

Obviously it took me a bit of time to enter my password and passphrase, so does --passphrase-time have a real interpretation in seconds? or does it stop much sooner than 60 seconds because I didn't specify a large memory limit?

from tarsnap.

cperciva avatar cperciva commented on July 22, 2024

"use up to" means that the scrypt code tries to figure out how fast your CPU is and picks parameters which it predicts will use that much time. In this case, it clearly underestimated your CPU performance -- possibly because your CPU was clocked down but sped up one it started being used.

from tarsnap.

gperciva avatar gperciva commented on July 22, 2024

Addressed in PR #38.

from tarsnap.

cperciva avatar cperciva commented on July 22, 2024

Fixed in 89d0340.

from tarsnap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.