crypto asymetrique

129 views
Skip to first unread message

remy.au...@gmail.com

unread,
Nov 23, 2021, 10:00:49 AM11/23/21
to
Hello
I propose you an asymmetric crypto algo which is not low on a factorization problem

Alice builds an integer


n=352,clefprivee=13

(n)mod(2)=0
(n)mod(3)=1
(n)mod(5)=2
(n)mod(7)=2
(n)mod(11)=0
(n)mod(13)=1
(n)mod(17)=12
(n)mod(19)=10



Bob builds an integer in two steps by changing only one value in the decomposition and performing a multiplication


n1=0+2*2+2*3*3+2*3*5*4+2*3*5*7*2+2*3*5*7*11*7+2*3*5*7*11*13*1+2*3*5*7*11*13*17*12 =6172882

n1%2=0
n1%3=1
n1%5=2
n1%7=2
n1%11=1
n1%13=1
n1%17=12
n1%19=10

publicbob=n1*3=18518646

publicbob%2=0
publicbob%3=0
publicbob%5=1
publicbob%7=6
publicbob%11=3
publicbob%13=3
publicbob%17=2

Alice

publicbob%clefprivee=3

and to avoid any problem bob builds 2 whole because he doesn't know the private key of alice
the main pb of this algorithm is the construction of n1, I am well aware of it these for that
https://mathoverflow.net/questions/409190/academic-arithmetic-operation-decomposition



Jogei

unread,
Nov 23, 2021, 12:32:56 PM11/23/21
to
On 11/23/21 9:00 AM, remy.au...@gmail.com wrote:
> Hello
> I propose you an asymmetric crypto algo which is not low on a factorization problem

Would you provide more detail on how this would work?

1. How public and private keys are generated.
2. How to encipher.
3. How to decipher.
4. How to sign.
5. How to verify signature.

I would like finer detail so that I may try to implement your proposed
cryptosystem using Python to run some tests.

--

Jogei


wizzofozz

unread,
Nov 23, 2021, 2:43:40 PM11/23/21
to
Op 23-11-2021 om 16:00 schreef remy.au...@gmail.com:

> the main pb of this algorithm is the construction of n1, I am well aware of it these for that
> https://mathoverflow.net/questions/409190/academic-arithmetic-operation-decomposition


I guess that by 'pb' you mean 'problem' (perhaps try to use whole words
and some punctuation).

So I assume that you're asking about the construction of n1.
But isn't that the Chinese remainder problem?

From the Wiki (https://en.wikipedia.org/wiki/Chinese_remainder_theorem):
"There are certain things whose number is unknown. If we count them by
threes, we have two left over; by fives, we have three left over; and by
sevens, two are left over. How many things are there?"

Ozz

remy.au...@gmail.com

unread,
Nov 24, 2021, 4:22:54 AM11/24/21
to
I admit that I am not always very clear
from this representation
the construction of an integer for alice is very simple

p=123457759,clefprivee=24443
publicalice=p*clefprivee+1
publicalice%clefprivee=1


then the Bob does as he wants, but he manages to change only one value in the decomposition of publicAlice

p<n

publicalice before modification

(publicalice)mod(2)=0
(publicalice)mod(3)=1
(publicalice)mod(5)=2
(publicalice)mod(7)=2
(publicalice)mod(11)=0
(publicalice)mod(13)=1
(publicalice)mod(17)=12
(publicalice)mod(19)=10
...
(publicalice)mod(p)=...

publicalice after modification

(publicalice)mod(2)=0
(publicalice)mod(3)=1
(publicalice)mod(5)=2
(publicalice)mod(7)=2
(publicalice)mod(11)=0 --> 8
(publicalice)mod(13)=1
(publicalice)mod(17)=12
(publicalice)mod(19)=10
...
(publicalice)mod(p)=...

publicbob =(publicalice after modification)+10


Alice retrieves bob's message

publicbob%clefprivee-1 =10


the main difficulty of this algo lies in the modification of
publicalice it is not necessary to forget that I do not have right to the primoriel
(2*3*5*7*11*13*...)
the integers are too big


cdl remy



remy.au...@gmail.com

unread,
Nov 24, 2021, 4:31:26 AM11/24/21
to

>
> publicbob =(publicalice after modification)+10
>

No need to specify that all variations are possible

remy.au...@gmail.com

unread,
Nov 26, 2021, 4:22:37 AM11/26/21
to
Hello

a little aside
have you ever seen from far or near something that looks like this arithmetic
n=2*3*5*7*11*13*17*19*23

(n/2)%2=1 (1,0,0,0,0,0,0,0,0)
(n/3*2)%3=1 (0,1,0,0,0,0,0,0,0)
(n/5*4)%5=1 (0,0,1,0,0,0,0,0,0)
(n/7*3)%7=1 (0,0,0,1,0,0,0,0,0)
(n/11*7)%11=1
(n/13*7)%13=1
(n/17*14)%17=1
(n/19*14)%19=1
(n/23*20)%23=1


now if I want to do an addition for example 25+5
I add 5 to all the modulo of 25
n1=25
n1%2=1
n1%3=1
n1%5=0
n1%7=4
n1%11=3
n1%13=12
n1%17=8
n1%19=6
n1%23=2

n1=25+5
n1%2=0
n1%3=0
n1%5=0
n1%7=2
n1%11=8
n1%13=4
n1%17=12
n1%19=11
n1%23=7

and so I can do
x=x1=x2=x3=x4=x5=x6=x7=x8=5
n1=(25+(n/23*20)*x+(n/19*14)*x1+(n/17*14)*x2+(n/13*7)*x3+(n/11*7)*x4+(n/7*3)*x5+(n/5*4)*x6+(n/3*2)*x7+(n/2)*x8)%n=30

except that here I can do a little fun with the x's as I want
x=5 ,x1=10,x2=20,x3=25....
well on the other hand I don't see what it can be used for but in math we like useless stuff
so I want a possible return or link on something that already exists


cdl remy


remy.au...@gmail.com

unread,
Nov 26, 2021, 5:56:45 AM11/26/21
to

wizzofozz

unread,
Nov 27, 2021, 11:36:54 AM11/27/21
to
Op 26-11-2021 om 10:22 schreef remy.au...@gmail.com:
> Hello
>
> a little aside
> have you ever seen from far or near something that looks like this arithmetic
> n=2*3*5*7*11*13*17*19*23
>
> (n/2)%2=1 (1,0,0,0,0,0,0,0,0)
> (n/3*2)%3=1 (0,1,0,0,0,0,0,0,0)
> (n/5*4)%5=1 (0,0,1,0,0,0,0,0,0)
> (n/7*3)%7=1 (0,0,0,1,0,0,0,0,0)
> (n/11*7)%11=1
> (n/13*7)%13=1
> (n/17*14)%17=1
> (n/19*14)%19=1
> (n/23*20)%23=1

Ok, so here you are showing a list of modular inverses of (n/f) modulo f.
Since n/f and f are coprime, it's guaranteed the inverse exists.
But can you explain why you are showing this.

> now if I want to do an addition for example 25+5
> I add 5 to all the modulo of 25
> n1=25
> n1%2=1
> n1%3=1
> n1%5=0
> n1%7=4
> n1%11=3
> n1%13=12
> n1%17=8
> n1%19=6
> n1%23=2
>
> n1=25+5
> n1%2=0
> n1%3=0
> n1%5=0
> n1%7=2
> n1%11=8
> n1%13=4
> n1%17=12
> n1%19=11
> n1%23=7
>

ok, the sum of the moduli is the modulus of the sum (a%n+b%n == (a+b)%n
(mod n)). That is what you are showing here I guess.

> and so I can do

'and so' is a big step (at least to me).

> x=x1=x2=x3=x4=x5=x6=x7=x8=5
> n1=(25+(n/23*20)*x+(n/19*14)*x1+(n/17*14)*x2+(n/13*7)*x3+(n/11*7)*x4+(n/7*3)*x5+(n/5*4)*x6+(n/3*2)*x7+(n/2)*x8)%n=30
>

I am not sure how this is related to the lists above. I can remove the
25, and then I find that n1=x=x2=..=x8=whatever. I like the result, and
I am trying to understand why it is so. May take me a while.
I just tried with n=2*3*5, but then it doesn't seem to work.

> except that here I can do a little fun with the x's as I want
> x=5 ,x1=10,x2=20,x3=25....
> well on the other hand I don't see what it can be used for but in math we like useless stuff
> so I want a possible return or link on something that already exists
>

I don't know of any, but it is fun to play with.

Ozz


wizzofozz

unread,
Nov 27, 2021, 1:47:59 PM11/27/21
to
Op 27-11-2021 om 17:36 schreef wizzofozz:
>
> I just tried with n=2*3*5, but then it doesn't seem to work.

It does work (I didn't change the inverses accordingly. After fixing
it's alright).

Ozz

remy.au...@gmail.com

unread,
Nov 29, 2021, 3:50:32 AM11/29/21
to
thank you for your attention
I may have I say may have so without guarantee
find an algo an asymmetric crypto that works

but first I have to look at something

cdl remy

remy.au...@gmail.com

unread,
Nov 29, 2021, 10:33:48 AM11/29/21
to

alice=126
privatealice=31
alice%privatealice=2


bob calculation b ,v23,v7


b=2*3*5*7*11*13*17*19*23*29*31
v23=b/23*10
v23%2=0
v23%3=0
v23%5=0
v23%7=0
v23%11=0
v23%13=0
v23%17=0
v23%19=0
v23%23=1
v23%29=0
v23%31=1
...


v7=b/7
v7%2=0
v7%3=0
v7%5=0
v7%7=1
v7%11=0
v7%13=0
v7%17=0
v7%19=0
v7%23=0
v7%29=0
v7%31=0

then calculates and makes public the value publicbob=(alice+v23)*5+v7


alice finds bob's measure
publicbob%privatealice=10



an attacker Eve can only do
publicbob%alice


Needless to say that I am well aware that I am still working on the problem of calculating b
problem still without solution for me


cdl remy

ps : unless I am mistaken, this approach does not impact RSA
at worst RSA+1 only shifts the factors

Vincent Treagle

unread,
Nov 29, 2021, 4:35:38 PM11/29/21
to
This example is very hard to follow. Please post a clear example of how
this would be used to generate keypairs and encrypt/decrypt a session key.

--

Vinnie T.

remy.au...@gmail.com

unread,
Nov 30, 2021, 4:06:03 AM11/30/21
to

> This example is very hard to follow. Please post a clear example of how
> this would be used to generate keypairs and encrypt/decrypt a session key.
>

yes I know to handle simple

we are used to look at the integers as a product of prime number
here I propose to define an integer with all the prime number lower than it
p<n

n%2=v2
n%3=v3
n%5=v5
n%7=v7
...
n%p=vp



when you add or multiply for example

n2=n+5

n2%2=v2+5
n2%3=v3+5
n2%5=v5+5
n2%7=v7+5
...=..+5
n2%p=vp+5

now I propose to modify only one value of the representation
for that I calculate values v which have a decomposition like that

v11%2 = 0
v11%3 = 0
v11%5 = 0
v11%7 = 0
v11%11= 1
v11%13= 0
v11%17= 0
v11%19= 0
v11%23= 0
...
v11%p = 0

so

n%11 =5
(n+v11)%11 =5+1
(n+v11*3)%11=5+3

and all other values are unchanged or not moved

now my example should be easier to understand
and if you find a link that looks like this arithmetic I'm a taker

I don't have much time right now but I'll make a program
just to see

cdl remy


remy.au...@gmail.com

unread,
Nov 30, 2021, 9:24:45 AM11/30/21
to
now the real question is how many exact solutions there are if I do a brute force attack


copy/paste everything into one file CryptoAsym.java and
c:\Users\....>javac CryptoAsym.java
c:\Users\....>java CryptoAsym


******************************debut*******************
import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;


public class CryptoAsym
{

public static void main(String args[])
{
Bob b=new Bob();
//13*523+3=6802
BigInteger publicAlice=new BigInteger("6802");
BigInteger publicbob=b.setPublicAlice(publicAlice);
System.out.println();
System.out.println("Alice calcule msg of Bob whit clef private 523 and 3");
System.out.println("msg de bob = "+publicbob.mod(new BigInteger("523")).divide(new BigInteger("3")));

}
}



class Bob{
Vector listNombrePremier;
Vector listValeurUnitaire;

public BigInteger setPublicAlice(BigInteger v)
{
System.out.println("publicAlice="+v);
System.out.println("start init");
listNombrePremier=initNbPremier(v);
listValeurUnitaire =initValUnitaire(listNombrePremier);
System.out.println("end init ");

Random r = new Random();
int num1=r.nextInt(listValeurUnitaire.size());
int num2=r.nextInt(listValeurUnitaire.size());

//calcul msg bob= 3*5=15
v=v.multiply(new BigInteger( "5"));
v=v.add((BigInteger)listValeurUnitaire.elementAt(num1));
v=v.multiply(new BigInteger( "3"));
v=v.add((BigInteger)listValeurUnitaire.elementAt(num2));

System.out.println("publicBob="+v);
return v;
}
/*
this function initializes a vector with all prime numbers <n
*/
private Vector initNbPremier(BigInteger v){
Vector lst=new Vector();
BigInteger un =BigInteger.ONE;
BigInteger p=un.nextProbablePrime();
while(p.compareTo(v)==-1)
{
lst.add(p);
p=p.nextProbablePrime();
}
return lst;
}

/*
this function initializes a vector with the values which allows to modify only one element of the decomposition
*/
private Vector initValUnitaire(Vector v){
BigInteger primoriel=BigInteger.ONE;
BigInteger val,test,nbP,poid;
Vector v2=new Vector();
for(int i=0;i<v.size();i++) {primoriel=primoriel.multiply((BigInteger)v.get(i));}

for(int i=0;i<v.size();i++)
{
nbP=(BigInteger)v.get(i);
val=primoriel.divide(nbP);
test=val.mod(nbP);
poid=BigInteger.ONE;

while(test.compareTo(BigInteger.ONE)!=0)
{
poid=poid.add(BigInteger.ONE);
test=val.multiply(poid).mod(nbP);//
}
v2.add((primoriel.divide(nbP)).multiply(poid));
//System.out.println(poid+" "+nbP+" "+((primoriel.divide(nbP)).multiply(poid)).mod(nbP)+" "+v2.size());
}
return v2;

}

}

********************************fin**********************

remy.au...@gmail.com

unread,
Dec 1, 2021, 5:31:42 AM12/1/21
to


I added an obj to do a brute force attack
well these dead to have the solution it is not necessary to take the greatest frequency but quite simply the greatest value,
damage has the arrival one will have a strange arithmetic which I do not know to use or which is not useful has much thing

thank you for your attention
cdl remy


import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;


public class CryptoAsym
{

public static void main(String args[])
{
Bob b=new Bob();
//13*523+3=6802
BigInteger publicAlice=new BigInteger("6802");
BigInteger publicbob=b.setPublicAlice(publicAlice);
System.out.println();
System.out.println("Alice calcule msg of Bob whit clef private 523 and 3");
System.out.println("msg de bob = "+publicbob.mod(new BigInteger("523")).divide(new BigInteger("3")));

Eve e=new Eve(publicAlice,publicbob);
e.attackForceBrute();

}


}

class Eve{
BigInteger publicAlice,publicBob;
Eve(BigInteger v,BigInteger v2) {
this.publicAlice=v;
this.publicBob=v2;
}

public void attackForceBrute()
{
BigInteger nb,nb2;
Vector v=initNbPremier(publicAlice);
for(int i=0;i<v.size();i++)
{
nb=(BigInteger)v.get(i);
nb2=publicAlice.mod(nb);
if(nb2.compareTo(BigInteger.ZERO)!=0){
System.out.println(nb+" ;"+nb2+" ;"+publicBob.mod(nb).divide(nb2)+" ;");

Anonymous

unread,
Dec 1, 2021, 5:57:30 PM12/1/21
to
On 12/1/21 4:31 AM, remy.au...@gmail.com wrote:
>
>
> I added an obj to do a brute force attack
> well these dead to have the solution it is not necessary to take the greatest frequency but quite simply the greatest value,
> damage has the arrival one will have a strange arithmetic which I do not know to use or which is not useful has much thing
>
> thank you for your attention
> cdl remy

Thanks for posting this. It is interesting. Now we can play ;)

remy.au...@gmail.com

unread,
Dec 2, 2021, 6:34:11 AM12/2/21
to
thank you

the xls file to make statistics or frequency calculation
and the source code

unless I'm mistaken it doesn't become possible to find the solution
or a brute force attack gives a possible solution for all the values """" a bit like an xor or otp""""

I am not saying that the crypto system is safe,
I'm saying that I can't find bob's msg among all possible solutions




bob
publicbob=(publicAlice+privatebob)^2-privatebob^2+privatebobMsg

alice

(publicbob%(keyPriveeAlice))%clefprivee2=bobmsg


code source

https://www.cjoint.com/c/KLclvw2GdHJ
C:\Users\...\Crypto>java CryptoAsym >test.csv

the file xls csv
https://www.cjoint.com/c/KLclyMa0akJ



cdl remy


remy.au...@gmail.com

unread,
Dec 2, 2021, 8:20:06 AM12/2/21
to
and to avoid side effects I increase the power
see the end of the xls file

> the file xls csv
> https://www.cjoint.com/c/KLclyMa0akJ
>


It's up to you to play or to find an attack

cdl remy

remy.au...@gmail.com

unread,
Dec 2, 2021, 9:18:12 AM12/2/21
to
Le jeudi 2 décembre 2021 à 14:20:06 UTC+1, remy.au...@gmail.com a écrit :
> and to avoid side effects I increase the power

https://www.cjoint.com/c/KLcolJc8sOJ
https://www.cjoint.com/c/KLcomnpAdXJ



I'll take a break if you find something
I'm reachable via my personal page

cdl remy

remy.au...@gmail.com

unread,
Jan 4, 2022, 8:20:59 AMJan 4
to
I have studied the algo again
I have not found any way to find a solution, there is not even a brute force attack

I'll make a pdf for my personal page
The rest is up to you, you could even patent it as you wish...

cdl remy
Reply all
Reply to author
Forward
0 new messages