You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by "Sergey Zhemzhitsky (JIRA)" <ji...@apache.org> on 2011/08/10 12:00:28 UTC

[jira] [Created] (WSS-306) It would be nice to have WSSecEncryptedKey generate secret keys by means of KeyGenerator

It would be nice to have WSSecEncryptedKey generate secret keys by means of KeyGenerator
----------------------------------------------------------------------------------------

                 Key: WSS-306
                 URL: https://issues.apache.org/jira/browse/WSS-306
             Project: WSS4J
          Issue Type: Bug
          Components: WSS4J Core
    Affects Versions: 1.6.1
            Reporter: Sergey Zhemzhitsky
            Assignee: Colm O hEigeartaigh


WSS4J generates secret key itself instead of using http://download.oracle.com/javase/6/docs/api/javax/crypto/KeyGenerator.html#generateKey%28%29
{code}
    protected byte[] generateEphemeralKey() throws WSSecurityException {
        try {
            return WSSecurityUtil.generateNonce(this.keySize / 8);
        } catch (Exception e) {
            throw new WSSecurityException("Error in creating the ephemeral key", e);
        }
    }
{code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Resolved] (WSS-306) It would be nice to have WSSecEncryptedKey generate secret keys by means of KeyGenerator

Posted by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSS-306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh resolved WSS-306.
-------------------------------------

    Resolution: Fixed


I took a different approach to the supplied patch. I added in the change to use nanoTime in WSSecurityUtil though.

Colm.

> It would be nice to have WSSecEncryptedKey generate secret keys by means of KeyGenerator
> ----------------------------------------------------------------------------------------
>
>                 Key: WSS-306
>                 URL: https://issues.apache.org/jira/browse/WSS-306
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6.1
>            Reporter: Sergey Zhemzhitsky
>            Assignee: Colm O hEigeartaigh
>             Fix For: 1.6.3
>
>         Attachments: WSS-306.patch
>
>
> WSS4J generates secret key itself instead of using http://download.oracle.com/javase/6/docs/api/javax/crypto/KeyGenerator.html#generateKey%28%29
>     protected byte[] generateEphemeralKey() throws WSSecurityException {
>         try {
>             return WSSecurityUtil.generateNonce(this.keySize / 8);
>         } catch (Exception e) {
>             throw new WSSecurityException("Error in creating the ephemeral key", e);
>         }
>     }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Updated] (WSS-306) It would be nice to have WSSecEncryptedKey generate secret keys by means of KeyGenerator

Posted by "Anli Shundi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSS-306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anli Shundi updated WSS-306:
----------------------------

    Attachment: WSS-306.patch

Great catch.  Here's a proposed patch making that method abstract and implementing it in the direct WSSecEncrypt subclass.  Notice also the use of System.nano instead of milli in WSSecUtils

> It would be nice to have WSSecEncryptedKey generate secret keys by means of KeyGenerator
> ----------------------------------------------------------------------------------------
>
>                 Key: WSS-306
>                 URL: https://issues.apache.org/jira/browse/WSS-306
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6.1
>            Reporter: Sergey Zhemzhitsky
>            Assignee: Colm O hEigeartaigh
>         Attachments: WSS-306.patch
>
>
> WSS4J generates secret key itself instead of using http://download.oracle.com/javase/6/docs/api/javax/crypto/KeyGenerator.html#generateKey%28%29
>     protected byte[] generateEphemeralKey() throws WSSecurityException {
>         try {
>             return WSSecurityUtil.generateNonce(this.keySize / 8);
>         } catch (Exception e) {
>             throw new WSSecurityException("Error in creating the ephemeral key", e);
>         }
>     }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Closed] (WSS-306) It would be nice to have WSSecEncryptedKey generate secret keys by means of KeyGenerator

Posted by "Colm O hEigeartaigh (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSS-306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh closed WSS-306.
-----------------------------------

    
> It would be nice to have WSSecEncryptedKey generate secret keys by means of KeyGenerator
> ----------------------------------------------------------------------------------------
>
>                 Key: WSS-306
>                 URL: https://issues.apache.org/jira/browse/WSS-306
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6.1
>            Reporter: Sergey Zhemzhitsky
>            Assignee: Colm O hEigeartaigh
>             Fix For: 1.6.3
>
>         Attachments: WSS-306.patch
>
>
> WSS4J generates secret key itself instead of using http://download.oracle.com/javase/6/docs/api/javax/crypto/KeyGenerator.html#generateKey%28%29
>     protected byte[] generateEphemeralKey() throws WSSecurityException {
>         try {
>             return WSSecurityUtil.generateNonce(this.keySize / 8);
>         } catch (Exception e) {
>             throw new WSSecurityException("Error in creating the ephemeral key", e);
>         }
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Updated] (WSS-306) It would be nice to have WSSecEncryptedKey generate secret keys by means of KeyGenerator

Posted by "Sergey Zhemzhitsky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSS-306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Zhemzhitsky updated WSS-306:
-----------------------------------

    Description: 
WSS4J generates secret key itself instead of using http://download.oracle.com/javase/6/docs/api/javax/crypto/KeyGenerator.html#generateKey%28%29

    protected byte[] generateEphemeralKey() throws WSSecurityException {
        try {
            return WSSecurityUtil.generateNonce(this.keySize / 8);
        } catch (Exception e) {
            throw new WSSecurityException("Error in creating the ephemeral key", e);
        }
    }


  was:
WSS4J generates secret key itself instead of using http://download.oracle.com/javase/6/docs/api/javax/crypto/KeyGenerator.html#generateKey%28%29
{code}
    protected byte[] generateEphemeralKey() throws WSSecurityException {
        try {
            return WSSecurityUtil.generateNonce(this.keySize / 8);
        } catch (Exception e) {
            throw new WSSecurityException("Error in creating the ephemeral key", e);
        }
    }
{code}


> It would be nice to have WSSecEncryptedKey generate secret keys by means of KeyGenerator
> ----------------------------------------------------------------------------------------
>
>                 Key: WSS-306
>                 URL: https://issues.apache.org/jira/browse/WSS-306
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6.1
>            Reporter: Sergey Zhemzhitsky
>            Assignee: Colm O hEigeartaigh
>
> WSS4J generates secret key itself instead of using http://download.oracle.com/javase/6/docs/api/javax/crypto/KeyGenerator.html#generateKey%28%29
>     protected byte[] generateEphemeralKey() throws WSSecurityException {
>         try {
>             return WSSecurityUtil.generateNonce(this.keySize / 8);
>         } catch (Exception e) {
>             throw new WSSecurityException("Error in creating the ephemeral key", e);
>         }
>     }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Updated] (WSS-306) It would be nice to have WSSecEncryptedKey generate secret keys by means of KeyGenerator

Posted by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WSS-306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh updated WSS-306:
------------------------------------

    Fix Version/s: 1.6.3

> It would be nice to have WSSecEncryptedKey generate secret keys by means of KeyGenerator
> ----------------------------------------------------------------------------------------
>
>                 Key: WSS-306
>                 URL: https://issues.apache.org/jira/browse/WSS-306
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 1.6.1
>            Reporter: Sergey Zhemzhitsky
>            Assignee: Colm O hEigeartaigh
>             Fix For: 1.6.3
>
>         Attachments: WSS-306.patch
>
>
> WSS4J generates secret key itself instead of using http://download.oracle.com/javase/6/docs/api/javax/crypto/KeyGenerator.html#generateKey%28%29
>     protected byte[] generateEphemeralKey() throws WSSecurityException {
>         try {
>             return WSSecurityUtil.generateNonce(this.keySize / 8);
>         } catch (Exception e) {
>             throw new WSSecurityException("Error in creating the ephemeral key", e);
>         }
>     }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org