Steganografiya quyidagi sohalarda qo'llaniladi, lekin ular bilan cheklanmaydi



Download 45,83 Kb.
bet23/40
Sana14.04.2022
Hajmi45,83 Kb.
#551350
1   ...   19   20   21   22   23   24   25   26   ...   40
Bog'liq
sregono

triggers['dtype'] = WM_X.dtype
nb_blocks = min(nb_blocks, len(WM_X))

step = floor(len(WM_X) / nb_blocks)
# For each block
for block in range(0, nb_blocks):
# Generate the encryption key
key = Fernet.generate_key()
# Add the key to the key set
keys.append(key)
# Initiating the encryption object based on the key
f = Fernet(key)
# Encrypt / store
to_encrypt = WM_X[block * step:(block + 1) * step].tobytes()
encrypted_trigger = f.encrypt(to_encrypt)
triggers['block_' + str(block)] = encrypted_trigger

triggers['shape'] = (int(shape_x / nb_blocks), shape_y)
triggers['dtype'] = WM_X.dtype

encrypted_trigger = {'triggers': triggers, 'keys': keys}

return encrypted_trigger

def decrypt_trigger(self, triggers, block_id, key):
""" Decrypt trigger block

Args:
triggers (dict): Encrypted trigger information
block_id (int): Trigger block to decrypt
key (str): Decryption key

Returns:
clear_trigger (array): Decrypted trigger

"""
shape = triggers['shape']
dtype = triggers['dtype']
f = Fernet(key)
clear_trigger = f.decrypt(triggers['block_' + str(block_id)])
clear_trigger = np.frombuffer(clear_trigger, dtype=dtype)
return clear_trigger.reshape(shape)


class DAWN(nn.Module):
""" Wrapper class for DAWN watermark deployement

Args:
original_model (Object): model to be watermarked
args (dict): args for watermarking
"""

def __init__(self, original_model, args):

super(DAWN, self).__init__()

Download 45,83 Kb.

Do'stlaringiz bilan baham:
1   ...   19   20   21   22   23   24   25   26   ...   40




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish