Create account entropy pool instead of master key

This commit is contained in:
AsamK 2024-12-15 21:14:40 +01:00
parent 9d92a3e06b
commit c3f8d68ceb
2 changed files with 1 additions and 8 deletions

View file

@ -1550,9 +1550,7 @@ public class SignalAccount implements Closeable {
return key;
}
pinMasterKey = KeyUtils.createMasterKey();
save();
return pinMasterKey;
return getOrCreateAccountEntropyPool().deriveMasterKey();
}
private MasterKey getMasterKey() {

View file

@ -15,7 +15,6 @@ import org.signal.libsignal.zkgroup.InvalidInputException;
import org.signal.libsignal.zkgroup.profiles.ProfileKey;
import org.whispersystems.signalservice.api.account.PreKeyCollection;
import org.whispersystems.signalservice.api.backup.MediaRootBackupKey;
import org.whispersystems.signalservice.api.kbs.MasterKey;
import java.security.SecureRandom;
import java.util.ArrayList;
@ -109,10 +108,6 @@ public class KeyUtils {
return getSecretBytes(32);
}
public static MasterKey createMasterKey() {
return MasterKey.createNew(secureRandom);
}
public static MediaRootBackupKey createMediaRootBackupKey() {
return new MediaRootBackupKey(getSecretBytes(32));
}