mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 13:27:59 +01:00
Let server generate copyToMedia IVs
We include the IV in the encrypted payload, so we can let the server choose them instead of the client
This commit is contained in:
committed by
Jon Chambers
parent
a5f60b1522
commit
f2cb04817b
@@ -512,19 +512,13 @@ public class ArchiveController {
|
||||
@JsonDeserialize(using = ByteArrayAdapter.Deserializing.class)
|
||||
@NotNull
|
||||
@ExactlySize(32)
|
||||
byte[] encryptionKey,
|
||||
|
||||
@Schema(description = "A 16-byte IV for AES, encoded in standard padded base64", implementation = String.class)
|
||||
@JsonDeserialize(using = ByteArrayAdapter.Deserializing.class)
|
||||
@NotNull
|
||||
@ExactlySize(16)
|
||||
byte[] iv) {
|
||||
byte[] encryptionKey) {
|
||||
|
||||
CopyParameters toCopyParameters() {
|
||||
return new CopyParameters(
|
||||
sourceAttachment.cdn(), sourceAttachment.key(),
|
||||
objectLength,
|
||||
new MediaEncryptionParameters(encryptionKey, hmacKey, iv),
|
||||
new MediaEncryptionParameters(encryptionKey, hmacKey),
|
||||
mediaId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user