Efficiently read and write data to the array without revealing the accessed location. The secret read / write device (1) inputs a read command or a write command, and when a read command is input, outputs a secret sentence [a [x]] which is the xth element of the secret sentence array [a]. , When a write command is input, the secret text [d] is added to the secret text [a [x]] which is the xth element of the secret text array [a]. The secret reading unit (12) reads the secret sentence [a [x]], which is the xth element from the array [a] of the secret sentences. The buffer addition unit (13) adds the secret sentence [c] having the unreflected value c to the secret sentence [a [x]]. The buffer addition unit (14) adds a secret statement [x] and a secret statement [d] to the write buffer [b]. When the number of elements in the write buffer [b] exceeds a predetermined value, the secret writing unit (15) moves the secret text vector [b0] to the access position indicated by the secret text vector [b0] in the secret text array [a]. Add the values indicated by b1].
展开▼