Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

investigate if token creation can be speeded up #168

Closed
aeneasr opened this issue Jul 24, 2016 · 5 comments
Closed

investigate if token creation can be speeded up #168

aeneasr opened this issue Jul 24, 2016 · 5 comments
Assignees
Labels
feat New feature or request.

Comments

@aeneasr
Copy link
Member

aeneasr commented Jul 24, 2016

No description provided.

@aeneasr aeneasr added the feat New feature or request. label Jul 24, 2016
@aeneasr aeneasr added this to the 0.2.0 milestone Jul 24, 2016
@aeneasr aeneasr self-assigned this Jul 24, 2016
@aeneasr
Copy link
Member Author

aeneasr commented Jul 24, 2016

I believe that HMAC-SHA256 (used in fosite) is, although slower, favorable to HMAC-SHA1

@aeneasr
Copy link
Member Author

aeneasr commented Jul 24, 2016

It's actually the blowfish hashing algorithm that is being used to validate the client credentials:

Dropped 39 nodes (cum <= 1.02s)
Showing top 10 nodes out of 34 (cum >= 2.94s)
      flat  flat%   sum%        cum   cum%
   191.12s 93.34% 93.34%    191.12s 93.34%  github.com/ory-am/hydra/vendor/golang.org/x/crypto/blowfish.encryptBlock
    10.30s  5.03% 98.37%    201.39s 98.36%  github.com/ory-am/hydra/vendor/golang.org/x/crypto/blowfish.ExpandKey
     2.12s  1.04% 99.41%      2.12s  1.04%  math/big.addMulVVW
     0.48s  0.23% 99.64%      2.93s  1.43%  math/big.nat.montgomery
     0.11s 0.054% 99.70%    201.53s 98.43%  github.com/ory-am/hydra/vendor/golang.org/x/crypto/bcrypt.expensiveBlowfishSetup
         0     0% 99.70%      2.93s  1.43%  crypto/rand.Prime
         0     0% 99.70%      2.93s  1.43%  crypto/rsa.GenerateKey
         0     0% 99.70%      2.93s  1.43%  crypto/rsa.GenerateMultiPrimeKey
         0     0% 99.70%      2.94s  1.44%  github.com/ory-am/hydra/cmd.Execute
         0     0% 99.70%      2.94s  1.44%  github.com/ory-am/hydra/cmd.runHostCmd

@aeneasr
Copy link
Member Author

aeneasr commented Jul 24, 2016

Workfactor of 10 get's us to ~100 hits / s - maybe make this configurable?

@aeneasr
Copy link
Member Author

aeneasr commented Jul 25, 2016

workfactor is now refactored so that (theoratically) configuring it is possible. However, this is sort of an upstream issue of viper #212

@aeneasr aeneasr modified the milestone: 0.2.0 Jul 25, 2016
@aeneasr
Copy link
Member Author

aeneasr commented Aug 1, 2016

workfactor is now refactored so that (theoratically) configuring it is possible. However, this is sort of an upstream issue of viper #212

this is now resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request.
Projects
None yet
Development

No branches or pull requests

1 participant