[jira] [Commented] (PDFBOX-5767) Encryption IV value

2024-02-12 Thread Simon Steiner (Jira)


[ 
https://issues.apache.org/jira/browse/PDFBOX-5767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17816663#comment-17816663
 ] 

Simon Steiner commented on PDFBOX-5767:
---

Thanks

> Encryption IV value
> ---
>
> Key: PDFBOX-5767
> URL: https://issues.apache.org/jira/browse/PDFBOX-5767
> Project: PDFBox
>  Issue Type: Bug
>Reporter: Simon Steiner
>Priority: Major
>
> Should this be set to a random number instead of zeros:
> new IvParameterSpec(new byte[16])



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5767) Encryption IV value

2024-02-12 Thread Tilman Hausherr (Jira)


[ 
https://issues.apache.org/jira/browse/PDFBOX-5767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17816659#comment-17816659
 ] 

Tilman Hausherr commented on PDFBOX-5767:
-

Please be more specific. There, Algorithm 8, 9 and 10 mention "an 
initialization vector of zero". The segment you quoted earlier is from 
Algorithm 1.

> Encryption IV value
> ---
>
> Key: PDFBOX-5767
> URL: https://issues.apache.org/jira/browse/PDFBOX-5767
> Project: PDFBox
>  Issue Type: Bug
>Reporter: Simon Steiner
>Priority: Major
>
> Should this be set to a random number instead of zeros:
> new IvParameterSpec(new byte[16])



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5767) Encryption IV value

2024-02-12 Thread Simon Steiner (Jira)


[ 
https://issues.apache.org/jira/browse/PDFBOX-5767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17816658#comment-17816658
 ] 

Simon Steiner commented on PDFBOX-5767:
---

I was looking at prepareEncryptionDictRev6

> Encryption IV value
> ---
>
> Key: PDFBOX-5767
> URL: https://issues.apache.org/jira/browse/PDFBOX-5767
> Project: PDFBox
>  Issue Type: Bug
>Reporter: Simon Steiner
>Priority: Major
>
> Should this be set to a random number instead of zeros:
> new IvParameterSpec(new byte[16])



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5767) Encryption IV value

2024-02-12 Thread Tilman Hausherr (Jira)


[ 
https://issues.apache.org/jira/browse/PDFBOX-5767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17816652#comment-17816652
 ] 

Tilman Hausherr commented on PDFBOX-5767:
-

That is done in {{prepareAESInitializationVector()}}.

> Encryption IV value
> ---
>
> Key: PDFBOX-5767
> URL: https://issues.apache.org/jira/browse/PDFBOX-5767
> Project: PDFBox
>  Issue Type: Bug
>Reporter: Simon Steiner
>Priority: Major
>
> Should this be set to a random number instead of zeros:
> new IvParameterSpec(new byte[16])



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5767) Encryption IV value

2024-02-12 Thread Simon Steiner (Jira)


[ 
https://issues.apache.org/jira/browse/PDFBOX-5767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17816650#comment-17816650
 ] 

Simon Steiner commented on PDFBOX-5767:
---

PDF spec says "If using the AES algorithm, the Cipher Block Chaining (CBC) 
mode, which requires an initialization vector, is used. The block size 
parameter is set to 16 bytes, and the initialization vector is a 16-byte random 
number that is stored as the first 16 bytes of the encrypted stream or string."

> Encryption IV value
> ---
>
> Key: PDFBOX-5767
> URL: https://issues.apache.org/jira/browse/PDFBOX-5767
> Project: PDFBox
>  Issue Type: Bug
>Reporter: Simon Steiner
>Priority: Major
>
> Should this be set to a random number instead of zeros:
> new IvParameterSpec(new byte[16])



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-5767) Encryption IV value

2024-02-12 Thread Tilman Hausherr (Jira)


[ 
https://issues.apache.org/jira/browse/PDFBOX-5767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17816646#comment-17816646
 ] 

Tilman Hausherr commented on PDFBOX-5767:
-

Which one(s)? The PDF specification itself requires this. (I'm not a crypto 
expert, so I don't know if Adobe is intentionally weakening the encryption)

> Encryption IV value
> ---
>
> Key: PDFBOX-5767
> URL: https://issues.apache.org/jira/browse/PDFBOX-5767
> Project: PDFBox
>  Issue Type: Bug
>Reporter: Simon Steiner
>Priority: Major
>
> Should this be set to a random number instead of zeros:
> new IvParameterSpec(new byte[16])



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org