Skip to content

Commit

Permalink
Fixed IV key size used by AES GCM, see https://monal.im/blog/omemo-is…
Browse files Browse the repository at this point in the history
  • Loading branch information
hantu85 committed Jan 11, 2020
1 parent fb36472 commit 628db2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SharedCode/OMEMOModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ open class OMEMOModule: AbstractPEPModule {

let body = message.body!;

var iv = Data(count: 16);
var iv = Data(count: 12);
iv.withUnsafeMutableBytes { (bytes) -> Void in
SecRandomCopyBytes(kSecRandomDefault, 16, bytes.baseAddress!);
SecRandomCopyBytes(kSecRandomDefault, 12, bytes.baseAddress!);
}

var key = Data(count: 16);
Expand Down

0 comments on commit 628db2a

Please sign in to comment.