
Resident Identity Card

The Resident Identity Card () is an official identity document for personal identification in the People's Republic of China. According to the second chapter, tenth clause of the "Resident Identity Card Law", residents are required to apply for resident identity cards from the local Public Security Bureau, sub-bureaus or local executive police stations.
History.
Prior to 1984, citizens within the People's Republic of China were not required to obtain or carry identification in public. On April 6, 1984, the State Council of the People's Republic of China passed the "Identity Card Provisional Bill" (中华人民共和国居民身份证试行条例), commencing the process of gradual introduction of personal identification, in the footsteps of many developed countries at the time. The first generation identification cards were single paged cards made of polyester film. Between 1984 and 1991, trials for the new identity card system took place in Beijing, Shanghai and Tianjin. Shan Xiurong (单秀荣), a Chinese Opera performer and soprano from Beijing, was the first person to receive a first-generation identity card in China.
On September 6, 1985, the Standing Committee of the 12th National People's Congress passed the ", which regulated that all citizens over the age of 16 apply for identification cards. At that point, the Ministry of Public Security of the People's Republic of China created a unified authority responsible for the issuing and management of the ID cards. From 2003, it is reported that a total of 1.14 billion ID cards have been created in China, for a total of 960,000,000 holders. However, as a result of technological development and certain techniques made available to the civilian population, the existing cards became relatively easier to counterfeit, opening the increasing threat of false identification.
On June 1, 2003, the National People's Congress passed the new ", which expanded the scope of documents issued, and allowed soldiers in the People's Liberation Army and members of the People's Armed Police to apply for special identity cards. Individuals under the age of 16 were also permitted to voluntarily apply for an identification card. The law also established the use of newer, second-generation cards, which are machine-readable and more difficult to forge.
Contents.
The identity card contains basic information regarding the individual, such as the following:
Information stored in the identity database for second-generation ID cards includes work history, educational background, religion, ethnicity, police record, medical insurance status, landlord's phone number and personal reproductive history. In addition, more detailed personal information can be obtained by viewing hukou information from the card database. Starting on January 1, 2013, Beijing has started trials to include fingerprints in the ID cards, making it more difficult to forge ID cards or for people to use the ID cards of others.
In 1984, discussion over the contents of the identity card became controversial regarding whether to include details such as "marital status" and "occupation"; considering the actual situation of the People's Republic of China at the time, these details ultimately were not included in the ID card.
The first-generation ID cards contained a black-and-white photograph portrait of the individual; following the introduction of the second-generation cards, all identification portraits are printed in colour. From 1 January 2013 a mandatory switch to the second-generation cards came into force; all first-generation cards became void and unusable. If used, first-generation cards are treated as expired ID cards, and will not be accepted. It is a criminal offense to accept first-generation ID cards if the person who accepts it know that it is a first-generation card.
The dimensions of the second-generation cards are 85.725 mm × 53.975 mm × 0.900 mm, and the identity photo is sized at 358 × 441 pixels (width by height), printed at a resolution of 350dpi on RGB using 24-bit True Color, prepared using JPEG compression techniques in line with the requirements of ISO DIS 10918-1. The final image appears as a 26 mm × 32 mm portrait box in the top-right hand corner.
Identity cards in ethnic minority areas.
Within the ethnic minority regions in China, identity cards possess corresponding text in the respective minority language for both first-generation and second-generation cards. For example, cards officially signed and issued in Guangxi all contain accompanying text in Zhuang, as well as Chinese characters. According to the fourth clause of the "Resident Identity Card Law", "based on the "de facto" situation within the organs of self-government within autonomous ethnic regions, the content of the resident identity card can, alongside Chinese characters, be decided to include the text of the ethnic group exercising regional autonomy or choice of a local generic text". This law permits resident identity cards within designated ethnic minority regions to have bilingual text, and depending on region, cards may contain accompanying text in Zhuang, Uyghur, Yi, Tibetan, Mongolian or Korean.
Ethnic minority residents represented by the local autonomous region can apply to have an additional ethnic minority language displayed on their identity cards, whilst Han Chinese and other ethnic residents' cards only have Chinese characters displayed. Ethnic minorities within their representative autonomous regions can have their personal name displayed in both their native language and Chinese characters; for example, within Xinjiang Uyghur Autonomous Region, a card belonging to an Uyghur may display the cardholder's name as "" (Effendi Nasreddin), however ethnic Kazakhs and Xibe people living in Xinjiang may only have their names written in Chinese. The following table shows the languages used on identity cards within minority regions:
Identity card number.
From October 1, 1999, the PRC State Council approved the establishment of a citizen identification number system, and currently consists of an 18-digit code. This number, to some extent, has a function similar to that of the social security number in the United States, and each citizen has a unique number that remains unchanged for their entire lifetime. An exception previously existed, however, in rare instances where the same ID number was accidentally issued to two people prior to the system being digitalised.
Dim a, w, s ,id
 msgbox "This procedure for checking the identity card number and or-bit",vbokonly+vbinformation,"identity check procedures"
 id=inputbox("Enter the ID number 15 or 18 before the identity card numbers of 17 or","ID","11010519491231002")
 if vartype(id) <> 0 then
'Test the legality of the importation of numbers
 l = 0
 do until l = 1
 l = 1
 p = ""
 if len(id) <> 17 then
 if len(id) <> 15 then
 l = 0
 p = "enter the median is not correct, please enter 15 or 17-digit."
 end if
 end if
 for i = 1 to len(id)
 a = mid(id, i, 1)
 if asc(a) < asc("0") or asc(a) > asc("9") then
 l = 0
 p = p & vbCrLf & vbCrLf & "Please enter the number, do not include the characters“" & a & "”。"
 exit for
 end if
 next
 if l = 0 then
 id = inputbox("illegal input" & vbCrLf & vbCrLf & p, "input error", id)
 end if
 loop
'Will be number 15 or 17 places to number
 if len(id) = 15 then
 id = left(id, 6) & "19" & right(id, 9)
 end if
'Number 17 for the calculation of parity-check codes
 for i = 2 to 18
 a = mid(id, 19-i, 1)
 w = 2^(i-1) mod 11
 s = a * w + s
 next
 s = (12 - (s mod 11)) mod 11
 if s = 10 then s = "X"
'After checking the number of output
 inputbox "the identity card number of the parity-check codes for the“" & s & "”" & vbcrlf & vbcrlf & "by checking the ID card numbers are as follows:", "Check completed", id & s
 end if
// Must input 17 bit string of RID from left to right
function calcChecksum(rid) {
 var workArr = rid.split(").reverse();
 function W(i) {
 return Math.pow(2, i - 1) % 11;
 function S() {
 var sum = 0;
 for (var j=0; j<17; j++) {
 sum += workArr[j] * W(j + 2);
 return sum;
 return (12 - (S() % 11)) % 11;
// Test
alert(calcChecksum('63280119790817003')); // will alert 6
str = "34262219840209049" #身份证前17位 first 17 digits of ID number
wi = [7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2] # Wis
s = 0 # S in the context
for i in 0..str.length-1
n = str[i].to_i-48
s = s + n * wi[i]
end
a1 = (12 - s % 11) % 11
puts a1 # checksum
»> id_checksum = lambda s:(1 - 2 * int(s, 13)) % 11
»> check('63280119790817003')
6L
»> check('34052419800101001')
10L # according to the standard, this means 'X'
 *身份证验证，传入身份证，返回true即为正确。 ID number validation, pass in ID number, return true if success.
 *只能传入字符串，传入参数必须加引号。 can only pass in strings, parameter should be surrounded by quote marks.
function check_id_number($id)
 if (strlen($id) != 18) {
 return false;
 $temp = (str_split($id));
 $temp[17] == 'x'|| $temp[17] == 'X' ? $check = 10 : $check = $temp[17];
 array_pop($temp);
 $temp = array_reverse($temp);
 $sum = 0;
 foreach ($temp as $key => $value) {
 $w = pow(2, $key+1) % 11;
 $sum += $value * $w;
 if ((12 - $sum % 11) % 11 != $check) {
 return false;
 return true;
> checkCode
function(ID) {
 stopifnot(length(grep('^[0-9]{17}$', ID)) != 0)
 code <- (12 - sum( (2^(17:1))%%11 * as.integer(strsplit(ID, split=NULL)1) )) %% 11
> print(checkCode('34262219840209049'))
[1] 10
Usage of identification.
The identity card is the only acceptable legal document used to obtain resident permits or driving licenses, open bank accounts, register for mobile phone numbers, apply for tertiary education and technical college for mainland Chinese citizens, and is one of the acceptable legal documents used to buy train tickets and pass through security checkpoints within domestic terminals at airports in mainland China. Documentation is also required for marriages, household registrations and legal cases.
Recently, there have been more services that require the display of Resident Identity Cards, such as at Internet cafes and certain stores.
Police are required to inspect identification documents where:
Anti-counterfeiting measures.
First generation identity card.
Polyester plastic film, which utilizes an anti-counterfeit laser logo.
Second generation identity card.
Second-generation identity cards contain a non-contact IC chip card, a directional holographic "Great Wall" image, an anti-counterfeiting film made of green multi-layer polyester (PETG) composite material, optical variable optical storage containing the text "中国CHINA" situated on the card, and a microfilm string generating the letters "JMSFZ" (initials for the Pinyin of "Jumin Shenfenzheng"), and a "Great Wall" logo revealed by ultraviolet light.
Security and criticism.
Unlike the biometric identity cards in EU countries which comply with ICAO standards, the second-generation ID card imposes older technologies similar to MIFARE used on public transportation systems, which, unlike its ICAO-compliant counterparts, lacks the proper encryption of personal data such as BAC control, thus making the information stored on the chip openly accessible to any ID card readers at a near enough distance. Strangely, the document's validity period is not recorded on the IC chip, therefore one can only tell the validity of the document by physically examining the dates printed on the back of the card. Also, because identity cards lacks a different numbering scheme from the citizen's identity number for Chinese nationals, there's currently no way to deregister a lost ID card completely even when the loss of the identity card is reported to the police. The above characteristics have made identity cards vulnerable to identification theft, which is overwhelmingly common in China, with stolen ID cards retailing for over 200 yuan each on the black market. Despite the criticism from public, Ministry of Public Security has yet to announce any changes apart from the addition of fingerprint data on the already-insecure chip. On 2019, Ministry of Public Security announced that they would move forward resigning fingerprint data 