Commit Graph

49 Commits

Author SHA1 Message Date
Ehren Kret
83b37e74a3 remove unused objc compat 2025-02-07 05:30:56 -06:00
Pete Walters
3a63402138
Migrate to new Media/Message backup auth credentials 2024-11-01 15:46:58 -05:00
Ehren Kret
f4b772a7f1 convert #file to #fileID by enabling concise magic file upcoming feature 2024-09-29 20:03:17 -05:00
Harry
29511cdf1a
Generate thumbnails for backup attachment uploads 2024-09-20 10:11:22 -07:00
Pete Walters
6f4d0fcaa7
Add method for re-encrypting a filehandle 2024-08-30 14:44:56 -05:00
Harry Sanabria
8dec43f72f Fix broken rebase using since-deleted method 2024-08-07 16:01:03 -07:00
Harry
199a59583d
Add validation method for backup attachments (no digest) 2024-08-07 15:41:41 -07:00
Ehren Kret
780a131560 use diskPageSize constant in place of 8192 literal 2024-08-07 16:19:51 -05:00
Ehren Kret
1fe73e8a22 update comments on LocalFileHandle 2024-08-07 16:16:53 -05:00
Ehren Kret
99a58e93ec prefer lseek for returning file offset rather than locally tracking it 2024-08-07 16:16:53 -05:00
Ehren Kret
44e0031770 use reusable buffers for sha256 and attachment encryption 2024-08-07 16:16:53 -05:00
Ehren Kret
3a228ba708 change implementation from UnsafeMutablePointer<FILE> to System/FileDescriptor 2024-08-07 16:16:53 -05:00
Ehren Kret
06000fc070 minor CryptoKit related cleanup 2024-08-06 08:38:43 -05:00
Ehren Kret
99b52c05b2 replace Cryptography.computeSHA256HMAC(_🔑) with CryptoKit 2024-08-05 12:29:18 -05:00
Ehren Kret
214683960a replace Cryptography.computeSHA256HMAC(_🔑truncatedToBytes:) with CryptoKit 2024-08-05 12:29:18 -05:00
Ehren Kret
ff785f18e7 remove HmacContext 2024-08-05 12:29:18 -05:00
Ehren Kret
5e84ac1661 replace HmacContext in Cryptography with CryptoKit 2024-08-05 12:29:18 -05:00
Ehren Kret
eddffc615e delete Sha256DigestContext 2024-08-05 12:29:18 -05:00
Ehren Kret
0ddbc9e5bc replace use of Sha256DigestContext in Cryptography with CryptoKit 2024-08-05 12:29:18 -05:00
Ehren Kret
3f04087244 replace Cryptography.computeSHA256Digest with CryptoKit.SHA256.hash(data:) 2024-08-05 12:29:18 -05:00
Ehren Kret
897d2441f5 continue splitting apart Cryptography.swift 2024-08-05 12:29:18 -05:00
Ehren Kret
c083decbc9 remove CommonCrypto from Cryptography.swift 2024-08-05 12:29:18 -05:00
Ehren Kret
db49fc1fe4 migrate Sha256DigestContext from CommonCrypto to CryptoKit 2024-08-02 11:15:19 -05:00
Ehren Kret
657e7d25df add unit test for Sha256DigestContext 2024-08-02 11:15:19 -05:00
Ehren Kret
6a06a9ec53 replace CommonCrypto with CryptoKit in HmacContext 2024-08-02 11:14:29 -05:00
Ehren Kret
dad6e14cf9 add unit test for HmacContext using RFC 4231 test vectors 2024-08-02 11:14:29 -05:00
Ehren Kret
12ae11c728 use let for CipherContext now that it correctly uses reference semantics 2024-08-02 09:29:55 -05:00
Ehren Kret
4bfde67015 reduce visibility of enumerateInBlocks extension func 2024-08-02 09:29:55 -05:00
Ehren Kret
2048c1161a stop memory leak if CipherContext is not used all the way to finalize 2024-08-02 09:29:55 -05:00
Ehren Kret
4a0617a62d use new let syntax 2024-08-02 09:29:55 -05:00
Ehren Kret
715b76e153 remove unused cipher algorithms 2024-08-02 09:29:55 -05:00
Ehren Kret
6d79450518 move CipherContext into its own file 2024-08-02 09:29:55 -05:00
Ehren Kret
48149f0b5e move HmacContext into its own file 2024-08-02 09:29:55 -05:00
Ehren Kret
829b9cac7e rename SHA256DigestContext to Sha256DigestContext 2024-08-02 09:29:55 -05:00
Ehren Kret
e4147c9e4d split SHA256DigestContext out to its own file 2024-08-02 09:29:55 -05:00
Ehren Kret
e1cfd116a2 rename OWSAES256Key in swift to Aes256Key 2024-08-02 09:29:55 -05:00
Ehren Kret
7320874263 move OWSAES256Key to its own file 2024-08-02 09:29:55 -05:00
Ehren Kret
462a24d88f restrict visibility of Data extension method to same file 2024-08-01 16:21:16 -05:00
Ehren Kret
8db47c5f62 inline Cryptography.generateRandomBytes 2024-08-01 15:33:26 -05:00
Ehren Kret
557d6a67cc migrate Cryptography over to swift
`srand` is not accessible in swift. Remove `srand` anyhow as anything
using `rand` for any actual randomness should be considered a bug in
need of fixing rather than viewing `srand` as an acceptable workaround.
2024-08-01 14:43:34 -05:00
Ehren Kret
fa1cef674c
migrate Randomness to swift 2024-08-01 13:26:07 -05:00
Ehren Kret
69bd0af9ad migrate OWSAES256Key from objc to swift 2024-07-31 12:23:25 -05:00
Ehren Kret
c091e083d0
crypto cleanup 2024-07-30 14:40:33 -07:00
Harry
de4e4d4dcb
Make attachment decryption ~1000x faster 2024-07-29 13:39:59 -07:00
Harry
4421d31c26
Add bucketing padding when encrypting oversize text attachment 2024-07-24 09:52:06 -07:00
Harry
c26b79badf
Decrypt in memory when loading entire data blob into memory anyway 2024-07-23 13:03:55 -07:00
Harry
aa81671287
Fix bugs in EncryptedFileHandle implementation 2024-07-02 09:55:01 -07:00
Adam Sharp
3a3f6b850e
Fix integer conversion warnings 2024-07-01 15:20:17 -04:00
Harry
bb083ca39c
Fold SignalCoreKit into SignalServiceKit
Co-authored-by: Adam Sharp <sharplet@signal.org>
2024-06-26 08:44:41 -07:00