HomeWork20251107

HomePage | Memberswill go by tor | RecentChanges | Join |

task 1

a

because there is inverse a 1Z m *a^{-1} \in Z_m^*, so x=a 1b(modm)x=a^{-1} \cdot b (\mod{m})

b

because aa is not coprime with mm, let gg be the gcd of aa and mm, there are two integers p,qp,q such that ap+mq=g>1a p + m q =g>1. Therefore any number who is not multiple of gg is a candidate of bb as it must be k,b=ax+mk\exists k, b=a x + m k

c

Given another group generator g ig^i, the group is {g i1,g i2,,g i(m1),g im=(g m) i=1 i=1}\{g^{i \cdot 1}, g^{i \cdot 2}, \cdots, g^{i \cdot (m-1)}, g^{i \cdot m}=(g^m)^i=1^i=1\}

if ii is not coprime with mm, then there would be some smaller number a<m,g ia=1a&lt;m, g^{i a}=1 already; to have g ia=1g^{i a}=1, it means ia=mki a = m k for some kk. By 質因數分解 ii and mm, not coprime means some common prime factor for both, for example, i=3 15 2,m=2 33 4i=3^1 \cdot 5^2, m=2^3 \cdot 3^4 have 3 as common prime factor, then (3 15 2)a=(2 33 4)k(3^1 \cdot 5^2)a=(2^3 \cdot 3^4)k, a smaller aa to be 2 33 3<2 33 42^3 \cdot 3^3 &lt; 2^3 \cdot 3^4 and accordingly k=5 2k=5^2

The set of all generators is {g i|i and m coprime}\{g^i | \text{i and m coprime}\}

A side note about subgroup. The order of a subgroup SS must be 1h\frac{1}{h} of the order of the group GG for some positive integer hh. To prove this, define xS{xs|sS}x S \equiv \{x \cdot s | s \in S\} who has the same size as SS, then x 1Sx_1 S and x 2Sx_2 S are two either identical or disjoint sets for any group element x 1,x 2x_1,x_2, never partial intersection, therefore GG treated as a set must be disjoint union of x 1S,x 2S,,x hSx_1 S, x_2 S, \cdots, x_h S for some x 1,x 2,,x hx_1, x_2, \cdots, x_h. Then a trivial collary is that a group of order of a prime number has no trivial subgroup and any element other than 1 is a generator. Also, the set {x j|j is an integer}\{x^j| \text{j is an integer}\} must be a subgroup for any group element xx, therefore x |G|=1x^{|G|}=1 for any group element xx

d

all elements except 0 (operator's 1) can be generator by c above

task 2

any cyclic group (G,)(G,\cdot) of order mm is isomorphic to (Z m,+)(Z_m,+) with translation: g k i=1 k1g^k \Leftrightarrow \sum_{i=1}^k {1}

a

{g α1,g α2,,g α(n1),g αn=g m=1}\{g^{\alpha \cdot 1}, g^{\alpha \cdot 2}, \cdots, g^{\alpha \cdot (n-1)}, g^{\alpha \cdot n}=g^m=1\}

b

let the answer be pp, then g αp=g xαg^{\alpha p}=g^{x \alpha}

so k,αp=xα+km\exists k, \alpha p =x \alpha + k m

so px=knp-x=k n

so p=x(modn)p=x (\mod{n})

c

what DDH?

m=2×3×5=30m=2 \times 3 \times 5=30

(Z m *,)(Z_m^*,\cdot) is not necessarily cyclic (so nothing to do with task 2?)

Z 30 *={1,7,11,13,17,19,23,29}Z_30^*=\{1, 7, 11, 13, 17, 19, 23, 29\}

but with an excel, 7 4=11 4=13 4=17 4=19 2=23 4=29 2=17^4=11^4=13^4=17^4=19^2=23^4=29^2=1 and each element only forms a subgroup of order 2 or 4, never the whole group of order 8

(Z m,+)(Z_m,+) is cyclic group

d

as (Z m *,)(Z_m^*,\cdot) is not necessarily cyclic, a XZ m *X \in Z_m^* might not be of the form X=g xX=g^x except trivial one

however, If X,g,p 1,p 2,,p 44X,g,p_1,p_2, \cdots,p_44 are known and XX is pre-determined as X=g x(modm)X=g^x (\mod{m}) for some xx, then

Define:

X iX(modp i)X_i \equiv X (\mod{p_i})

g ig(modp i)g_i \equiv g (\mod{p_i})

By X=g x(modm)X=g^x (\mod{m})

X i=g i x(modp i)X_i=g_i^x (\mod{p_i}) and there is a ia_i such that X i=g i a i(modp i)X_i=g_i^{a_i} (\mod{p_i}). If NOT such a ia_i, for example g i=1g_i=1 and X i1X_i \neq 1, then the original quesntion is, as mentioned above, not well-posed and has no solution. To have a taste of such case, consider the problem of finding xx such that 29=7 x(mod30)29=7^x (\mod{30}) which, by c above already seen 7 i7^i has no 29, leads to

1=1 x(mod2)1=1^x (\mod{2})

2=1 x(mod3)2=1^x (\mod{3}) an impossibility condition

4=2 x(mod5)4=2^x (\mod{5})

Assume g ig_i has period q iq_i which is a factor of p i1p_i-1, then g i a i+k iq ig_i^{a_i+k_i q_i} satisfy the condition X i=g i a i+k iq i(modp i)X_i=g_i^{a_i+k_i q_i} (\mod{p_i}) as well for any integer k ik_i, x=a i+k iq ix=a_i+k_i q_i aka x=a i(modq i)x=a_i (\mod{q_i}) who also leads to more xx mod equations of prime factors p i,jp_{i,j} of q iq_i, many x=a i(modp i,j h i,j)x=a_i (\mod{p_{i,j}^{h_{i,j}}}) listed as the result

Then, in case no contradiction of these listed equations, by the black box hint xx is found

A side note of the blackbox hint. This is the story of 韓信點兵, 韓信 as a general in 秦末漢初 good at math used this method to count the head count of soldiers by grouping the soldiers by p ip_i and getting the a ia_i. The method is, given m=p 1p 2p nm=p_1 \cdot p_2 \cdot \cdots p_n, to assume x= i nc i jip jx=\sum_i^n {c_i \prod_{j \neq i} p_j}. Then a k=x(modp k)=c k( jkp j(modp k))a_k=x (\mod{p_k})=c_k \left( \prod_{j \neq k} p_j (\mod{p_k}) \right) to solve c kc_k then a general solution of xx is x=( i nc i jip j)+t i np ix=\left( \sum_i^n {c_i \prod_{j \neq i} p_j} \right) + t \cdot \prod_i^n p_i with any integer tt. One can actually group by p i h ip_i^{h_i} then the setting is to assume x= i nc i jip j h jx=\sum_i^n {c_i \prod_{j \neq i} p_j^{h_j}} and remember once the residual of p i h ip_i^{h_i} is out, no need to see the residual of p ip_i because it is determned already and introduce no new information about xx.

Example x=8(mod18)x=8 (\mod{18})

Then x=0(mod2)x=0 (\mod{2}) and x=8(mod3 2)x=8 (\mod{3^2}), set x=c 12+c 23 2x=c_1 \cdot 2 + c_2 \cdot 3^2 so 0=c 210=c_2 \cdot 1 and 8=c 128=c_1 \cdot 2 therefore c 1=4,c 2=0c_1=4,c_2=0 so x=8x=8 and the general solution is x=8+18tx=8+18t

A historian side note is that 韓信 was holding large army and was so inteligent so the king 劉邦 who was so afraid of possible 韓信's coup killed 韓信 later once 韓信 won all wars against other countries

task 3

task 4

Because cyclic, let S=g rS=g^r, given g p=1g^p=1, then the collision is

g x 1+rx 2=g x 1+rx 2g^{x_1+r x_2}=g^{x_1'+r x_2'} aka

x 1x 1=r(x 2x 2)(modp)x_1-x_1'=r (x_2-x_2') (\mod{p})

Since pp is prime, (Z p *,)(Z_p^*, \cdot) is itself a group having x 2x 2x_2-x_2' and the inverse of x 2x 2x_2-x_2' exists, therefore

r=(x 1x 1)(x 2x 2) 1(modp)r= (x_1-x_1') \cdot (x_2-x_2')^{-1} (\mod{p})

task 5

a

k,r,tZ 2 nk,r,t \in Z_2^n and s=k+rs=k+r where + in in sense of Z 2 nZ_2^n

u=s+t=k+r+tu=s+t=k+r+t

w=u+r=k+r+t+r=k+tw=u+r=k+r+t+r=k+t

w+t=k+t+t=kw+t=k+t+t=k

Alice answer kk and Bob answer w+tw+t, both the same

b

(S,U,W)=(K+R,K+R+T,K+R+T+R)(S,U,W)=(K+R,K+R+T,K+R+T+R)

R=U+WR=U+W

therefore K=S+R=S+U+WK=S+R=S+U+W

So the D can compute K=S+U+WK=S+U+W which should be the same as the 4rd argument for KK by answering true iff S+U+WS+U+W and 4rd argument the same