# US 2022/0045840 A1 · Methods and systems for somewhat homomorphic encryption and key updates based on geometric algebra for distributed ledger/blockchain technology

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0045840 A1
- Document ID: US20220045840A1
- Status: Published application
- Kind: A1
- Application number: 17/399,017
- Filed: 2021-08-10
- Published: 2022-02-10
- Earliest claimed: 2020-08-10
- Assignees: X-Logos, LLC
- Applicants: X-Logos, LLC
- Inventors: David W. Honorio Araujo da Silva; Carlos A. Paz de Araujo; Hanes Barbosa Marques de Oliveira; Marcelo Araujo Xavier
- Web page: https://patentgrep.com/patent/US20220045840A1

## CPC

- H04L 9/008: {involving homomorphic encryption}
- H04L 9/0861: {Generation of secret information including derivation or calculation of cryptographic keys or passwords}
- H04L 9/0891: {Revocation or update of secret information, e.g. encryption key update or rekeying}
- H04L 9/3033: {details relating to pseudo-prime or prime number generation, e.g. primality test}
- H04L 9/3073: {involving pairings, e.g. identity based encryption [IBE], bilinear mappings or bilinear pairings, e.g. Weil or Tate pairing}
- H04L 9/3239: {involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD}
- H04L 9/50: {using hash chains, e.g. blockchains or hash trees}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Disclosed are methods and systems to encrypt data with SomeWhat Homomorphic Encryption (SWHE) properties for submission to a distributed ledger/blockchain that allows further open operations retained in the distributed ledger/blockchain on the encrypted data that will be properly reflected when the encrypted result is decrypted by the data owner. The somewhat homomorphic properties include addition and scalar division. Also disclosed is an ability to update a secret key applied for a ciphertext such that a single piece of data may be provided on the distributed ledger/blockchain by a data owner to a new data owner without also exposing other data encrypted with the original secret key of the original data owner.

## Claims

### Claim 1

A method for performing somewhat homomorphic operations on encrypted data in a distributed ledger/blockchain system without decrypting said encrypted data and where data resulting from said somewhat homomorphic operations remains encrypted, the method comprising:
generating off-chain by a data owner node device a secret/private key sk and a public evaluation key pk, wherein said secret/private key sk is comprised of a first key multivector (K1), a second key multivector (K2), and an integer g, and wherein said public evaluation key pk is comprised of a prime number q;
encrypting off-chain by said data owner node device an integer message m as a function of at least one Geometric Algebra geometric product operation of said first key multivector (K1), said second key multivector (K2), and a message multivector (M), and a scalar multiplication operation with integer g to obtain message ciphertext multivector (C), wherein said message multivector (M) is a representation of said integer message m;
submitting on-chain by said data owner node device said message ciphertext multivector (C) as a transaction for said distributed ledger/blockchain system;
performing on-chain by a calculation node device at least one somewhat homomorphic operation with said message ciphertext multivector (C) to calculate a result ciphertext multivector (CR), wherein a smart contract for said distributed ledger/blockchain defines available somewhat homomorphic operations and wherein said calculation node device is part of said same distributed ledger/blockchain system as said owner node device; and
decrypting off-chain by said data owner node device said result ciphertext multivector (CR) as a function of at least one Geometric Algebra geometric product operation of an inverse of said first key multivector (K1−1), an inverse of said second key multivector (K2−1), said result ciphertext multivector (CR), and a scalar division operation with integer g to obtain a result multivector (R), wherein said result multivector (R) is a representation of a numeric result r.

### Claim 2 (depends on 1)

The method of claim 1:
wherein said process of generating off-chain by said data owner node device a secret/private key sk and a public evaluation key pk further comprises:
setting said prime number q equal to a prime number;
randomly generating 16 integer values;
setting a first 8 of said 16 integer values as coefficient values of said first key multivector (K1), wherein said first key multivector (K1) has an inverse;
setting a last 8 of said 16 integer values as coefficient values of said second key multivector (K2), wherein said second key multivector (K2) has an inverse;
setting said integer g to a random integer value;
setting said secret/private key sk to be said first key multivector (K1), said second key multivector (K2), and said integer g; and
setting said public evaluation key to be said prime number q;
wherein said process of encrypting off-chain by said data owner node device said integer message m to obtain message ciphertext multivector (C) further comprises:
setting coefficients of said message multivector (M) equal to random integer values except for a m12 coefficient of said message multivector (M);
calculating said m12 coefficient of said message multivector (M) as a function of said other coefficients of said message multivector (M) and said integer message m modulo prime number q (m12=|−m0−m1+m2+m3−m13+m23+m123+m|q);
calculating a transitional message multivector (M′) as a scalar multiplication of said integer g and said message multivector (M) (M′=Mg); and
calculating said message ciphertext multivector (C) as a geometric product of said first key multivector (K1), said transitional message multivector (M′) and said second key multivector (K2) (C=K1M′K2); and
wherein said process of decrypting off-chain by said data owner node device said result ciphertext multivector (CR) further comprises:
calculating a transitional result multivector (R′) as a geometric product of said inverse of said first key multivector (K1−1), said transitional result multivector (R′) and said inverse of said second key multivector (K2−1)(R′=K1−1CRK2−1);
calculating a result multivector (R) as a scalar division of said integer g and said transitional result multivector (R′) by said integer g (R=R′/g);
calculating said numeric result r as a function of coefficients of said result multivector (R) modulo prime number q (r=|r0+r1−r2−r3+r12+r13−r23−r123|q); and
updating said numeric result r by mapping said numeric result r to a rational number using an Extended Euclidean Algorithm (EEA).

### Claim 3 (depends on 1)

The method of claim 1 wherein said process of performing on-chain by a calculation node device at least one somewhat homomorphic operation further comprises calculating said result ciphertext multivector (CR) as a component-wise addition of coefficients of said message ciphertext multivector (C) and coefficients of a second ciphertext multivector (C2) (CR=C+C2) available on said distributed ledger/blockchain system such that when said result ciphertext multivector (CR) is decrypted, the numeric result r is equivalent to adding unencrypted values represented by said message ciphertext multivector (C) and said second ciphertext multivector (C2).

### Claim 4 (depends on 1)

The method of claim 1 wherein said process of performing on-chain by a calculation node device at least one somewhat homomorphic operation further comprises calculating said result ciphertext multivector (CR) as a scalar division of all elements of said message ciphertext multivector (C) by scalar value α (CR=C/α) such that when said result ciphertext multivector (CR) is decrypted, the numeric result r is equivalent to dividing integer message m by said scalar value α.

### Claim 5 (depends on 1)

The method of claim 1 wherein said distributed ledger/blockchain system is a private/permissioned system.

### Claim 6 (depends on 1)

The method of claim 1 further comprising:
generating off-chain by said data owner node device a second secret/private key sk2, wherein said second secret/private key sk2 is comprised of a first key multivector (K21) of said second secret/private key sk2, a second key multivector (K22) of said second secret/private key sk2, and a second integer g2, such that said second secret/private key sk2 is not equal to said secret/private key sk;
calculating off-chain by said data owner node device a token t comprised of a first token multivector (T1) and a second token multivector (T2) as a function of said secret/private key sk and said second secret/private key sk2;
updating off-chain by said data owner node device said message ciphertext multivector (C) to be encrypted by said second secret/private key sk2 instead of by said secret/private key sk as a function of said first token multivector (T1) and said second token multivector (T2) to create a new message ciphertext multivector (Cnew);
transferring off-chain by said data owner node device said second secret/private key sk2 to a new data owner node device through a traditional key exchange protocol;
submitting on-chain by said data owner node device said new message ciphertext multivector (Cnew) as a transaction for said distributed ledger/blockchain system;
decrypting off-chain by said new data owner node device said new message ciphertext multivector (Cnew) as a function of at least one Geometric Algebra geometric product operation of an inverse of said first key multivector (K21−1) of said second secret/private key sk2, an inverse of said second key multivector (K22−1) of said second secret/private key sk2, said new message ciphertext multivector (Cnew), and a scalar division operation with integer g2 of said second secret/private key sk2 to obtain said message multivector (M), wherein said new data owner node device has access only to said new message ciphertext multivector (Cnew) and not to other data encrypted by said data owner node device with said secret/private key sk.

### Claim 7 (depends on 6)

The method of claim 6:
wherein said process of calculating off-chain by said data owner node device said token t further comprises calculating said first token multivector (T1) as T1=K21K1−1g−1g2 and said second token multivector (T2) as T2=K2−1K22; and
wherein said process of updating off-chain by said data owner node device said message ciphertext multivector (C) to create said new message ciphertext multivector (Cnew) further comprises calculating said new message ciphertext multivector (Cnew) as Cnew=T1CT2.

### Claim 8 (depends on 7)

The method of claim 7 wherein said result ciphertext multivector (CR) is processed instead of said message ciphertext multivector (C).

### Claim 9 (depends on 6)

The method of claim 6 wherein operations of each of said data owner node device, said calculation node device, and said new data owner node device are performed by one or more hardware devices as desired by a user.

### Claim 10

A distributed ledger/blockchain system that performs somewhat homomorphic operations on encrypted data without decrypting said encrypted data and where data resulting from said somewhat homomorphic operations remains encrypted, the distributed ledger/blockchain system comprising:
a data owner node device, wherein said data owner node device further comprises:
a key generation subsystem that generates, off-chain, a secret/private key sk and a public evaluation key pk, wherein said secret/private key skis comprised of a first key multivector (K1), a second key multivector (K2), and an integer g, and wherein said public evaluation key pk is comprised of a prime number q;
an encryption subsystem that encrypts, off-chain, an integer message m as a function of at least one Geometric Algebra geometric product operation of said first key multivector (K1), said second key multivector (K2), and a message multivector (M), and a scalar multiplication operation with integer g to obtain message ciphertext multivector (C), wherein said message multivector (M) is a representation of said integer message m;
a ciphertext submission subsystem that submits, on-chain, said message ciphertext multivector (C) as a transaction for said distributed ledger/blockchain system; and
a decryption subsystem that decrypts, off-chain, a result ciphertext multivector (CR) as a function of at least one Geometric Algebra geometric product operation of an inverse of said first key multivector (K1−1), an inverse of said second key multivector (K2−1), said result ciphertext multivector (CR), and a scalar division operation with integer g to obtain a result multivector (R), wherein said result multivector (R) is a representation of a numeric result r; and,
a calculation node device, wherein said calculation node device further comprises:
a somewhat homomorphic operation calculation subsystem that performs, on-chain, at least one somewhat homomorphic operation with said message ciphertext multivector (C) to calculate a result ciphertext multivector (CR), wherein a smart contract for said distributed ledger/blockchain defines available somewhat homomorphic operations and wherein said calculation node device is part of said same distributed ledger/blockchain system as said owner node device.

### Claim 11 (depends on 10)

The distributed ledger/blockchain system of claim 10:
wherein said key generation subsystem of said data owner node device further sets said prime number q equal to a prime number, randomly generates 16 integer values, sets a first 8 of said 16 integer values as coefficient values of said first key multivector (K1) wherein said first key multivector (K1) has an inverse, sets a last 8 of said 16 integer values as coefficient values of said second key multivector (K2) wherein said second key multivector (K2) has an inverse, sets said integer g to a random integer value, sets said secret/private key sk to be said first key multivector (K1) said second key multivector (K2), and said integer g, and sets said public evaluation key to be said prime number q;
wherein said encryption subsystem of said data owner node device further sets coefficients of said message multivector (M) equal to random integer values except for a m12 coefficient of said message multivector (M), calculates said m12 coefficient of said message multivector (M) as a function of said other coefficients of said message multivector (M) and said integer message m modulo prime number q (m12=|−m0−m1+m2+m3−m13+m23+m123+m|q) , calculates a transitional message multivector (M′) as a scalar multiplication of said integer g and said message multivector (M)(M′=Mg), and calculates said message ciphertext multivector (C) as a geometric product of said first key multivector (K1), said transitional message multivector (M′) and said second key multivector (K2)(C=K1M′K2); and
wherein said decryption subsystem of said data owner node device further calculates a transitional result multivector (R′) as a geometric product of said inverse of said first key multivector (K1−1), said transitional result multivector (R′) and said inverse of said second key multivector (K2−1)(R′=K1−1CRK2−1), calculates a result multivector (R) as a scalar division of said integer g and said transitional result multivector (R′) by said integer g(R=R′/g), calculates said numeric result r as a function of coefficients of said result multivector (R) modulo prime number q (r=|r0+r1−r2−r3+r12+r13−r23−r123|q); and updates said numeric result r by mapping said numeric result r to a rational number using an Extended Euclidean Algorithm (EEA).

### Claim 12 (depends on 10)

The distributed ledger/blockchain system of claim 10 wherein said somewhat homomorphic operation calculation subsystem calculation node device further calculates said result ciphertext multivector (CR) as a component-wise addition of coefficients of said message ciphertext multivector (C) and coefficients of a second ciphertext multivector (C2)(CR=C+C2) available on said distributed ledger/blockchain system such that when said result ciphertext multivector (CR) is decrypted, the numeric result r is equivalent to adding unencrypted values represented by said message ciphertext multivector (C) and said second ciphertext multivector (C2).

### Claim 13 (depends on 10)

The distributed ledger/blockchain system of claim 10 wherein said wherein said somewhat homomorphic operation calculation subsystem calculation node device further calculates said result ciphertext multivector (CR) as a scalar division of all elements of said message ciphertext multivector (C) by scalar value α (CR=C/α) such that when said result ciphertext multivector (CR) is decrypted, the numeric result r is equivalent to dividing integer message m by said scalar value α.

### Claim 14 (depends on 10)

The distributed ledger/blockchain system of claim 10 wherein said distributed ledger/blockchain system is a private/permissioned system.

### Claim 15 (depends on 10)

The distributed ledger/blockchain system of claim 10:
wherein said key generation subsystem of said data owner node device generates, off-chain, a second secret/private key sk2, wherein said second secret/private key sk2 is comprised of a first key multivector (K21) of said second secret/private key sk2, a second key multivector (K22) of said second secret/private key sk2, and a second integer g2, such that said second secret/private key sk2 is not equal to said secret/private key sk;
wherein said data owner node device further comprises:
a token calculation subsystem that calculates, off-chain, a token t comprised of a first token multivector (T1) and a second token multivector (T2) as a function of said secret/private key sk and said second secret/private key sk2;
an update key subsystem that updates, off-chain, said message ciphertext multivector (C) to be encrypted by said second secret/private key sk2 instead of by said secret/private key sk as a function of said first token multivector (T1) and said second token multivector (T2) to create a new message ciphertext multivector (Cnew);
a key transfer subsystem that transfers, off-chain, said second secret/private key sk2 to a new data owner node device through a traditional key exchange protocol;
wherein said a ciphertext submission subsystem of said data owner node device submits, on-chain, said new message ciphertext multivector (Cnew) as a transaction for said distributed ledger/blockchain system; and
distributed ledger/blockchain system further comprises:
said new data owner node device, wherein said new data owner node device further comprises:
a new data owner decryption subsystem decrypts, off-chain, said new message ciphertext multivector (Cnew) as a function of at least one Geometric Algebra geometric product operation of an inverse of said first key multivector (K21−1) of said second secret/private key sk2, an inverse of said second key multivector (K22−1) of said second secret/private key sk2, said new message ciphertext multivector (Cnew), and a scalar division operation with integer g2 of said second secret/private key sk2 to obtain said message multivector (M), wherein said new data owner node device has access only to said new message ciphertext multivector (Cnew) and not to other data encrypted by said data owner node device with said secret/private key sk.

### Claim 16 (depends on 15)

The distributed ledger/blockchain system of claim 15:
wherein said token calculation subsystem of said data owner node device further calculates said first token multivector (T1) as T1=K21K1−1g−1g2 and said second token multivector (T2) as T2=K2−1K22; and
wherein said update key subsystem of said data owner device further calculates said new message ciphertext multivector (Cnew) as Cnew=T1CT2.

### Claim 17 (depends on 16)

The distributed ledger/blockchain system of claim 16 wherein said result ciphertext multivector (CR) is processed instead of said message ciphertext multivector (C).

### Claim 18 (depends on 15)

The distributed ledger/blockchain system of claim 15 wherein operations of each of said data owner node device, said calculation node device, and said new data owner node device are performed by one or more hardware devices as desired by a user.
