Re: [其他] 這應該算數位加密
※ 引述《dotonbot (red)》之銘言:
: c=g^(t+j)^g^(t+j)
: 老王知道 c,g,t
: 老王是否能解出 g^j^g^j ?
: 解得出來可以去領一萬多的獎金
: https://twitter.com/NavCoin_Global/status/1064661972703154178
Note: a^b^c means a^(b^c), not (a^b)^c
Assume exp, log and real powers are computable
then by taking log_g and ^(1/g^t)
the question is equivalent to
Given g, t and d = (t+j)^(g^j), want j^(g^j)
For continuous case, if g > 1, t > 0 then
f(x) = (t+x)^(g^x) is an increasing funciton on x > 0
thus j = f^(-1)(d) and also j^(g^j) using method of finding root.
================================================================
Now we assume g, t and even j are all positive integers
log log f(x) = log (g^x log (t+x))
= x log g + log log (t+x)
hence log log d = j log g + log log (t+j) >= j log g
and M = log log d / log g is an upper bound of j.
Find a prime p divide d, maybe try and error(?)
Write p^r || d, if p^r | d but p^(r+1) not | d.
Therefore d = (t+j)^(g^j) would have a large p-power divisor
say, p^r | d but p^(r+1) not | d
r can be found by dividing p many times.
since r = g^j ord_p(t+j) <= g^j log_p(t+j) <= g^j log_p(t+M)
thus log_g r - log_g log_p (t+M) <= j <= log_g r
log_g log_p (t+M) is not big, j has few possibilities, just try them all.
(actually r = g^j ord_p(t+j) can remove many invalid j)
這個做法的問題是,要是 t+j 好死不死質因數太大,或根本質數,那就QQ了
不過由於 g^j 肯定不小,比起 d 來說 t+j 應該沒那麼怪物就是
想超久結果找個質因數就解決了乾
--
嗯嗯ow o
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.112.7.188
※ 文章網址: https://www.ptt.cc/bbs/Math/M.1542799195.A.DA3.html
推
11/21 20:10,
7年前
, 1F
11/21 20:10, 1F
→
11/21 20:10,
7年前
, 2F
11/21 20:10, 2F
原來如此,看來不能隨便取 log 或至少要直接幹實數 log XD
我看看要怎麼規避,其實我很多地方都沒考慮多項式時間啊orz
→
11/21 21:49,
7年前
, 3F
11/21 21:49, 3F
→
11/21 21:50,
7年前
, 4F
11/21 21:50, 4F
我覺得 mod 大有可為可是想不出來qw q
像上面那個找質數的計算時間真心很懸
都不整除可能可以上反元素,但沒想到做法
hensel lemma只能多項式超難過
計算時間不想好的話 說不定勘根四捨五入都比較快(?)
※ 編輯: Desperato (140.112.7.188), 11/21/2018 21:58:39
推
11/21 23:53,
7年前
, 5F
11/21 23:53, 5F
→
11/21 23:55,
7年前
, 6F
11/21 23:55, 6F
→
11/21 23:55,
7年前
, 7F
11/21 23:55, 7F
→
11/21 23:57,
7年前
, 8F
11/21 23:57, 8F
→
11/21 23:57,
7年前
, 9F
11/21 23:57, 9F
→
11/22 00:00,
7年前
, 10F
11/22 00:00, 10F
→
11/22 00:00,
7年前
, 11F
11/22 00:00, 11F
推
11/24 03:16,
7年前
, 12F
11/24 03:16, 12F
→
11/24 03:16,
7年前
, 13F
11/24 03:16, 13F
討論串 (同標題文章)