BCrypt performance deterioration

后端 未结 4 1158
灰色年华
灰色年华 2021-01-31 10:42

We have three web applications (standard Spring MVC-Hibernate) running within a Jboss server 6.1. All three applications share a common authentication method which is compiled a

4条回答
  •  半阙折子戏
    2021-01-31 10:50

    One possible explanation is that the SeedGenerator of SecureRandom is causing the delays.

    Springs BCrypt implementation uses SecureRandom which in turn uses a SeedGenerator which in turn may use the blocking /dev/random. Here is a good description of those classes.

    That bugreport also reports performance problems in BCrypt and traced them back to the seed generator, showing full stacktraces. The BCrypt implementation is different but the stacktrace below SecureRandom must be identical to the spring implementation. Their solution was to reduce the reseed frequency of BCrypt.

提交回复
热议问题