mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Create account entropy pool instead of master key
This commit is contained in:
parent
9d92a3e06b
commit
c3f8d68ceb
2 changed files with 1 additions and 8 deletions
|
@ -1550,9 +1550,7 @@ public class SignalAccount implements Closeable {
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
pinMasterKey = KeyUtils.createMasterKey();
|
return getOrCreateAccountEntropyPool().deriveMasterKey();
|
||||||
save();
|
|
||||||
return pinMasterKey;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private MasterKey getMasterKey() {
|
private MasterKey getMasterKey() {
|
||||||
|
|
|
@ -15,7 +15,6 @@ import org.signal.libsignal.zkgroup.InvalidInputException;
|
||||||
import org.signal.libsignal.zkgroup.profiles.ProfileKey;
|
import org.signal.libsignal.zkgroup.profiles.ProfileKey;
|
||||||
import org.whispersystems.signalservice.api.account.PreKeyCollection;
|
import org.whispersystems.signalservice.api.account.PreKeyCollection;
|
||||||
import org.whispersystems.signalservice.api.backup.MediaRootBackupKey;
|
import org.whispersystems.signalservice.api.backup.MediaRootBackupKey;
|
||||||
import org.whispersystems.signalservice.api.kbs.MasterKey;
|
|
||||||
|
|
||||||
import java.security.SecureRandom;
|
import java.security.SecureRandom;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -109,10 +108,6 @@ public class KeyUtils {
|
||||||
return getSecretBytes(32);
|
return getSecretBytes(32);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MasterKey createMasterKey() {
|
|
||||||
return MasterKey.createNew(secureRandom);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static MediaRootBackupKey createMediaRootBackupKey() {
|
public static MediaRootBackupKey createMediaRootBackupKey() {
|
||||||
return new MediaRootBackupKey(getSecretBytes(32));
|
return new MediaRootBackupKey(getSecretBytes(32));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue