Method and apparatus for data security using coding a message keeping nature

PURPOSE: A data security method for encoding the maintain of characteristic and apparatus thereof are provided to supply high security about encoded data by managing information of a user having the use right of encoded data. CONSTITUTION: A data security apparatus generates reference data as random data having the same length as raw data and generates mapping table between original data and reference data. The data security apparatus encodes original data based on the mapping table. The data security apparatus stores use right information including information of a reference for inquiring original data. The data security apparatus transmits encoded data to a database server.