You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2007/11/06 14:59:50 UTC
[jira] Created: (JCR-1206) UUID generation: SecureRandom should be
used by default
UUID generation: SecureRandom should be used by default
-------------------------------------------------------
Key: JCR-1206
URL: https://issues.apache.org/jira/browse/JCR-1206
Project: Jackrabbit
Issue Type: Improvement
Components: jackrabbit-core
Reporter: Thomas Mueller
Currently, the UUID generation used the regular java.util.Random implementation to generate random UUIDs. The seed value of Random is initialized using System.currentTimeMillis(); for Windows, the resolution is about 15 milliseconds. That means two computer that start creating UUIDs with Jackrabbit within the same 15 millisecond interval will generate the same UUIDs. In a clustered environment the nodes could be started automatically at the same time (for example after a backup).
Also, the Random class uses a 48-bit seed, which is much less than the number of random bits in UUID (122). This is not secure. See also:
http://en.wikipedia.org/wiki/UUID
Random UUID probability of duplicates
"The probability [of duplicates] also depends on the quality of the random number generator. A cryptographically secure pseudorandom number generator must be used to generate the values, otherwise the probability of duplicates may be significantly higher."
Therefore, I suggest to change VersionFourGenerator to use the SecureRandom implementation in by default.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (JCR-1206) UUID generation: SecureRandom should be
used by default
Posted by "Thomas Mueller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Mueller resolved JCR-1206.
---------------------------------
Resolution: Fixed
Fix Version/s: 1.4
Fixed as of revision 594470
> UUID generation: SecureRandom should be used by default
> -------------------------------------------------------
>
> Key: JCR-1206
> URL: https://issues.apache.org/jira/browse/JCR-1206
> Project: Jackrabbit
> Issue Type: Improvement
> Components: jackrabbit-core
> Reporter: Thomas Mueller
> Assignee: Thomas Mueller
> Fix For: 1.4
>
>
> Currently, the UUID generation used the regular java.util.Random implementation to generate random UUIDs. The seed value of Random is initialized using System.currentTimeMillis(); for Windows, the resolution is about 15 milliseconds. That means two computer that start creating UUIDs with Jackrabbit within the same 15 millisecond interval will generate the same UUIDs. In a clustered environment the nodes could be started automatically at the same time (for example after a backup).
> Also, the Random class uses a 48-bit seed, which is much less than the number of random bits in UUID (122). This is not secure. See also:
> http://en.wikipedia.org/wiki/UUID
> Random UUID probability of duplicates
> "The probability [of duplicates] also depends on the quality of the random number generator. A cryptographically secure pseudorandom number generator must be used to generate the values, otherwise the probability of duplicates may be significantly higher."
> Therefore, I suggest to change VersionFourGenerator to use the SecureRandom implementation in by default.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (JCR-1206) UUID generation: SecureRandom should
be used by default
Posted by "Esteban Franqueiro (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542199 ]
Esteban Franqueiro commented on JCR-1206:
-----------------------------------------
Why not use UUID.randomUUID() directly?
> UUID generation: SecureRandom should be used by default
> -------------------------------------------------------
>
> Key: JCR-1206
> URL: https://issues.apache.org/jira/browse/JCR-1206
> Project: Jackrabbit
> Issue Type: Improvement
> Components: jackrabbit-core
> Reporter: Thomas Mueller
> Assignee: Thomas Mueller
> Fix For: 1.4
>
>
> Currently, the UUID generation used the regular java.util.Random implementation to generate random UUIDs. The seed value of Random is initialized using System.currentTimeMillis(); for Windows, the resolution is about 15 milliseconds. That means two computer that start creating UUIDs with Jackrabbit within the same 15 millisecond interval will generate the same UUIDs. In a clustered environment the nodes could be started automatically at the same time (for example after a backup).
> Also, the Random class uses a 48-bit seed, which is much less than the number of random bits in UUID (122). This is not secure. See also:
> http://en.wikipedia.org/wiki/UUID
> Random UUID probability of duplicates
> "The probability [of duplicates] also depends on the quality of the random number generator. A cryptographically secure pseudorandom number generator must be used to generate the values, otherwise the probability of duplicates may be significantly higher."
> Therefore, I suggest to change VersionFourGenerator to use the SecureRandom implementation in by default.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (JCR-1206) UUID generation: SecureRandom should
be used by default
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542202 ]
Felix Meschberger commented on JCR-1206:
----------------------------------------
> Why not use UUID.randomUUID() directly?
The problem is that Jackrabbit has its own UUID class implementation because Java only includes this starting with 1.5. Jackrabbit on the other hand is bound to be also running on Java 1.4. Therefore the JDK UUID class is not an option (currently).
> UUID generation: SecureRandom should be used by default
> -------------------------------------------------------
>
> Key: JCR-1206
> URL: https://issues.apache.org/jira/browse/JCR-1206
> Project: Jackrabbit
> Issue Type: Improvement
> Components: jackrabbit-core
> Reporter: Thomas Mueller
> Assignee: Thomas Mueller
> Fix For: 1.4
>
>
> Currently, the UUID generation used the regular java.util.Random implementation to generate random UUIDs. The seed value of Random is initialized using System.currentTimeMillis(); for Windows, the resolution is about 15 milliseconds. That means two computer that start creating UUIDs with Jackrabbit within the same 15 millisecond interval will generate the same UUIDs. In a clustered environment the nodes could be started automatically at the same time (for example after a backup).
> Also, the Random class uses a 48-bit seed, which is much less than the number of random bits in UUID (122). This is not secure. See also:
> http://en.wikipedia.org/wiki/UUID
> Random UUID probability of duplicates
> "The probability [of duplicates] also depends on the quality of the random number generator. A cryptographically secure pseudorandom number generator must be used to generate the values, otherwise the probability of duplicates may be significantly higher."
> Therefore, I suggest to change VersionFourGenerator to use the SecureRandom implementation in by default.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (JCR-1206) UUID generation: SecureRandom should be
used by default
Posted by "Thomas Mueller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Mueller reassigned JCR-1206:
-----------------------------------
Assignee: Thomas Mueller
> UUID generation: SecureRandom should be used by default
> -------------------------------------------------------
>
> Key: JCR-1206
> URL: https://issues.apache.org/jira/browse/JCR-1206
> Project: Jackrabbit
> Issue Type: Improvement
> Components: jackrabbit-core
> Reporter: Thomas Mueller
> Assignee: Thomas Mueller
>
> Currently, the UUID generation used the regular java.util.Random implementation to generate random UUIDs. The seed value of Random is initialized using System.currentTimeMillis(); for Windows, the resolution is about 15 milliseconds. That means two computer that start creating UUIDs with Jackrabbit within the same 15 millisecond interval will generate the same UUIDs. In a clustered environment the nodes could be started automatically at the same time (for example after a backup).
> Also, the Random class uses a 48-bit seed, which is much less than the number of random bits in UUID (122). This is not secure. See also:
> http://en.wikipedia.org/wiki/UUID
> Random UUID probability of duplicates
> "The probability [of duplicates] also depends on the quality of the random number generator. A cryptographically secure pseudorandom number generator must be used to generate the values, otherwise the probability of duplicates may be significantly higher."
> Therefore, I suggest to change VersionFourGenerator to use the SecureRandom implementation in by default.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.