Saturday, December 24, 2011

泛民初選電子投票保安要嚴密

在明年的特首選舉中,泛民將派出一位候選人參選,不過,怎樣公平、公開、公正地決定誰代表泛民參選?有見及此,我們一班資訊科技人員特別建立了一個電子投票及資訊安全系統,方便全港市民在私隱得到保障下參與初選機制,並且更迅速地能統計出投票結果。

初選投票將於2012年1月8日上午10時至晚上7時,在全港70多個票站進行,市民可在票站內的平板或筆記本電腦上直接投票;泛民將會以投票配合民意調查結果,以得票給得分最高的候選人,成為參加特首選舉的泛民代表。

身份證號碼須加密

為了選舉的公平,投票只限香港永久居民,每人只限投一票。但我們怎樣能保證不能重複投票?我們設計的投票程序,在投票站內會有工作人員檢查投票人的身份證,確定是「三粒星」永久居民,然後工作人員會協助市民輸入其身份證號碼,防止有人重複投票。

但我們如何保護市民的身份證號碼這重要個人私隱?首先,我們根本不會儲存市民的身份證號碼,因為號碼在輸入後會立即被系統以隨機號碼(random number)以散列算法(hashing)加密,使用的是國際資訊保安加密標準,所以在加密後被儲存的代號,只是一串不能夠被還原的亂碼,但系統則可以利用這亂碼確認其相關身份證號碼,之前有否被任何人在任何票站投票,以防止重複投票。

雖然這些亂碼不能還原,是沒有用的,但為保市民安心,泛民特首初選籌委會也進一步保證,所有資料將在選後刪除,市民可以放心。除此之外,我們亦引進一系列的資訊保安措施,包括以強密碼系統保護這獨立的投票電腦系統、https加密傳輸等,而且系統會拒絕來自香港以外的存取要求,以防被分散式阻斷服務攻擊(DDos)攻擊。

我們希望這次行動會成為泛民準備2017年普選特首的重要實驗,為未來選出給全民投票的泛民候選人初選機制作嘗試,而我們身為IT業者,也希望這會成為把資訊科技引入香港選舉歷史和民主發展的重要一步。

2011年12月24日 刋載於《蘋果日報》

24 Comments:

At 1:57 AM, Anonymous Anonymous said...

The keyspace in this case is all the HKID card combinations, which is 26M or 25 bits. Anyone who knows the exact algorithm or any secret key involved will always be able to create a dictionary and find out the plain message from the hashed value.

 
At 2:43 AM, Anonymous Anonymous said...

It is incorrect when you say "這些亂碼不能還原". This solution is inherently flawed, always prone to dictionary attack by an insider.

 
At 7:23 AM, Anonymous Anonymous said...

"因為號碼在輸入後會立即被系統以隨機號碼(random number)以散列算法(hashing)加密". How can this be done on different machines with the same HKID as input? If each machine generates its own random number for hashig, the hash value of the same HKID from each machine will be different and can't be check for dups, unless you restore back to its original input. If you use the same "random" number to hash on different machines, and use the final hash value to check for dups, that means who gets a hold of the random key generation method will be able to restore the HKID. Please clarify. Thanks.

 
At 8:01 AM, Blogger Charles Mok said...

We are not just using simple hashing but a rather complex, multi-level algorithm/process. Without knowing the original hashing algorithm it is impossible to even brute force attack. The approach has been verified by a team of independent security assessors. Thank you for the concern.

 
At 11:19 AM, Anonymous Alex said...

But I do believe you know over 60% of the risk is come from internal? And I still dont understand why the data will NOT be stored but still can have the ability to cross check with different polling stations? Be frank, you are trying to minimize the concerns here, the fact is you are NOT stored the actual ID number, but you stored the hashed data with the particular hashing mechanism, is my understanding correct?

 
At 12:43 PM, Anonymous Anonymous said...

congrats,all these years, the U.S. gov still haven't figured out a way to fully implement a secure e-election system that ppl trust. what you guys doing in HK is simply amazing. :)

 
At 12:55 PM, Blogger Charles Mok said...

This is not online voting for an election. This is electronic voting for a primary.

 
At 2:11 PM, Anonymous Anonymous said...

" We are not just using simple hashing but a rather complex, multi-level algorithm/process. Without knowing the original hashing algorithm it is impossible to even brute force attack."


It is not what was published in the voting web site. From the Q&A section http://pdce-primary.hk/?page_id=62

3. 經國際資訊保安加密標準SHA256加密後的資料並不能被還原,任何人(包括籌委會及系統開發者)將不能看到原本之號碼。

But you have just confirmed the development team which knows the exact set of algorithm and salts used will be able to construct a rainbow table and recover the data using a dictionary attack.

 
At 9:26 AM, Anonymous Anonymous said...

Charles: 你們的『個人私隱保障』聲明是否有誤導之嫌? 因為你們聲稱:
3. 經國際資訊保安加密標準SHA256加密後的資料並不能被還原,任何人(包括籌委會及系統開發者)將不能看到原本之號碼。

因為要在一部中央電腦檢查有冇人用相同身份證號碼重複投票,即一定要建立DATA BASE作比較,即同一ID必定產生同一亂碼!如果唔係點比較?所以,產生的Hash即等同身份證號碼,而hash產生的方式係由設計者決定,設計者根本可以用reverse方式還原ID!不是嗎?

另一致命弱點係:香港的身份證係由有規律的一個英文字母加7個數字組成,組合數量有限,而實際有效的不多過800萬個,因為香港只有700幾萬人,所以,要用電腦破解係有可能。

最後,你們好似講到系統非常安全,但根本係可能在ID由各站傳送回主機途中已經受man-in-the-middle attack! 以下係在YOUTUBE的示範:https://www.youtube.com/watch?v=w86ZrTJefBM

Wifi系統是非常容易受man-in-the-middle attack!你不是不知道吧?

 
At 12:47 PM, Anonymous Anonymous said...

anyway, i think that this is a text book case of Security Failure

 
At 1:45 PM, Anonymous Chan said...

雖然我已投左票,而且亦明白就算單是HKID洩漏的風險也不高,但我真擔心notebook有木馬的風險。BTW, 今次宣傳並不足

 
At 4:09 PM, Anonymous Anonymous said...

Hi Charles, is it possible to post a detailed technical report on the election after it has finished? So everyone can see it is secure. thanks

 
At 4:18 PM, Blogger Charles Mok said...

Yes we will try to. In fact, we plan to submit a proactive report to the Privacy Commissioners' Office next week.

 
At 8:03 PM, Anonymous Anonymous said...

Thanks= you. I will be interested to read it. Also, did you consider using the old fashioned method of using paper ballots and indelible ink to mark the voter? What was the conclusion?

 
At 10:53 PM, Anonymous Anonymous said...

莫先生:請問在哪裡可以睇到今次投票的詳細結果公布? 即74個票站投票人數分布,每位候選人得票多少及白票的數目。

因為用電腦投票,你們應該好快有這些資料!

 
At 2:46 AM, Blogger Charles Mok said...

今天在信報論壇的文章:《關於泛民初選要說的話》http://www.hkej.com/template/forum/php/forum_details.php?blog_posts_id=78948 牆內:1510:http://www.my1510.cn/article.php?id=70596 論壇:http://blog.sina.com.cn/s/blog_6622887b01011g2a.html 解釋泛民初選的資訊安全...

 
At 2:03 PM, Anonymous Anonymous said...

莫生:泛民初選網找不到每位候選人分站得票break down. 是否不可以/不方便提供?在銷毀資料前,最好學一般選舉咁提供此數據。

 
At 2:19 PM, Blogger Charles Mok said...

大會之前決定不提供這數據:兩位候選人不知道,籌委會不知道,工作人員也不知道。公平起見,不會覆查這資料。未來如果在另一次投票中決定可以公布這數據的話,另作別論 :)

其他投票數據:http://pdce-primary.hk/?page_id=49

 
At 2:24 PM, Blogger Charles Mok said...

據我所記得,香港選舉中,除了區議會在當個票站點票(如果多過一個票站)外,其他選舉的選票在運到點票中心時都是撈亂一齊點的,不會有分站各人得票breakdown;但可能在外地有些地方會公布。我有沒有記錯?

 
At 3:12 PM, Anonymous Anonymous said...

莫生:分站得票數據對候選人及大會都有參考作用。好簡單,如果在馮檢基的深水埗地頭,發現何的得票比馮還多,你知什麼原因嗎?係有種票可能。即可能共產黨動員建制派支持者投票俾何,可扭曲選舉結果。

其實這亦是泛民初選的潛在致命弱點,試想想,如果日後真係1人一票選特首,分分鐘泛民的候選人被建制派動員而扭曲選舉結果。因為假泛民支持者,到真正投票時,並不會支持泛民的候選人。佢地可以選個弱的對手出來同建制派對決。今次你們應該多謝人民力量、香港人網的惡搞踩場,暴露、質疑今次初選的種種問題。下次踩場可能就係建制派動員,問題仲大。

另外,大會亦可參考此數據,用來日後設立投票站位置參考。

 
At 3:28 PM, Anonymous Anonymous said...

莫生:無論個系統點安全,點完善,結果都係由人來影響,人的因素才是主要。泛民今次搞的初選,政治操作上是不可行的,就係因為有被扭曲結果的可能。試想,台灣的國民黨初選,會不會開放給非黨員的人投票?邏輯就係咁簡單,但因民支持泛民的學者及傳媒已經歸邊,並不講出問題所在,更假戲真做,其實係誤導緊好多對政治無知的香港人。如果你有去實地觀察一D投票站的實際投票情況,你會更了解問題所在。

 
At 11:01 PM, Blogger Charles Mok said...

I quote what Charles Low said on facebook:

https://www.facebook.com/hk.charles/posts/10150450424586461

人網及其支持者應該可以擊破晒全世界既網絡保安,勁過高登仔:
Salt+hash可以被dictionary table attack
Developer寧願唔種backdoor,反而會因為知道(預知random result!)random salt而輕易用dictionary attack
HMAC可以輕易brute force
NDA無效化
Software keyboard會比keylogger偷input

 
At 12:25 AM, Anonymous Anonymous said...

Is there a station by the hour breakdown? It's useful information for auditing purposes.

 
At 12:30 AM, Blogger Charles Mok said...

To the last post, sorry, we do not provide that breakdown (either to the candidates or the public). In fact, we provide the same info to the candidates as to the public.

 

Post a Comment

<< Home

-->