diff --git a/src/keri/app/habbing.py b/src/keri/app/habbing.py index 95bd3b247..5dbd11204 100644 --- a/src/keri/app/habbing.py +++ b/src/keri/app/habbing.py @@ -2099,7 +2099,8 @@ def __init__(self, **kwa): def make(self, *, secrecies=None, iridx=0, code=coring.MtrDex.Blake3_256, dcode=coring.MtrDex.Blake3_256, icode=coring.MtrDex.Ed25519_Seed, transferable=True, isith=None, icount=1, nsith=None, ncount=None, - toad=None, wits=None, delpre=None, estOnly=False, DnD=False, hidden=False, data=None): + toad=None, wits=None, delpre=None, estOnly=False, DnD=False, hidden=False, data=None, algo=None, + salt=None, tier=None): """ Finish setting up or making Hab from parameters includes inception. Assumes injected dependencies were already setup. @@ -2133,6 +2134,10 @@ def make(self, *, secrecies=None, iridx=0, code=coring.MtrDex.Blake3_256, dcode= hidden (bool): A hidden Hab is not included in the list of Habs. data (list | None): seal dicts + algo is str key creation algorithm code + salt(str): qb64 salt for randomization when salty algorithm used + tier(str): is str security criticality tier code when using salty algorithm + """ if not (self.ks.opened and self.db.opened and self.cf.opened): @@ -2164,6 +2169,9 @@ def make(self, *, secrecies=None, iridx=0, code=coring.MtrDex.Blake3_256, dcode= stem=stem, transferable=transferable, dcode=dcode, + algo=algo, + salt=salt, + tier=tier, temp=self.temp) serder = super(Hab, self).make(isith=isith, @@ -2208,6 +2216,11 @@ def make(self, *, secrecies=None, iridx=0, code=coring.MtrDex.Blake3_256, dcode= self.inited = True + @property + def algo(self): + pp = self.ks.prms.get(self.pre) + return pp.algo + def rotate(self, *, isith=None, nsith=None, ncount=None, toad=None, cuts=None, adds=None, data=None, **kwargs): """ diff --git a/src/keri/app/keeping.py b/src/keri/app/keeping.py index 4275636a3..516b56853 100644 --- a/src/keri/app/keeping.py +++ b/src/keri/app/keeping.py @@ -1010,15 +1010,16 @@ def incept(self, icodes=None, icount=1, icode=coring.MtrDex.Ed25519_Seed, transferable=transferable, temp=temp) digers = [coring.Diger(ser=signer.verfer.qb64b, code=dcode) for signer in nsigners] - # Secret to encrypt here pp = PrePrm(pidx=pidx, algo=algo, - salt=(creator.salt if not self.encrypter - else self.encrypter.encrypt(ser=creator.salt).qb64), stem=creator.stem, tier=creator.tier) + if creator.salt: + pp.salt = (creator.salt if not self.encrypter + else self.encrypter.encrypt(ser=creator.salt).qb64) + dt = helping.nowIso8601() ps = PreSit( new=PubLot(pubs=[verfer.qb64 for verfer in verfers],