# US 2016/0253520 A1 · Method and apparatus for device state based encryption key

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2016/0253520 A1
- Document ID: US20160253520A1
- Status: Published application
- Kind: A1
- Application number: 15/054,699
- Filed: 2016-02-26
- Published: 2016-09-01
- Earliest claimed: 2015-02-27
- Assignees: Samsung Electronics Co., Ltd.
- Applicants: Samsung Electronics Co., Ltd.
- Inventors: Kwanghwan MOON; Peng NING; Ken CHEN; Sangwoo RYU; SJ OH; Sami ORAVA; KyungBae PARK
- Web page: https://patentgrep.com/patent/US20160253520A1

## CPC

- G06F 9/545: {where tasks reside in different layers, e.g. user- and kernel-space}
- G06F 21/44: Program or device authentication
- G06F 21/602: {Providing cryptographic facilities or services}
- G06F 21/6281: {at program execution time, where the protection is within the operating system}
- G06F 21/72: in cryptographic circuits
- G06F 21/73: by creating or determining hardware identification, e.g. serial numbers
- H04L 9/0819: {Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) (network architectures or network communication protocols for key distribution in a packet data network H04L63/062)}
- H04L 9/088: {Usage controlling of secret information, e.g. techniques for restricting cryptographic keys to pre-authorized uses, different access levels, validity of crypto-period, different key- or password length, or different strong and weak cryptographic algorithms (network architectures or network communication protocols for using time-dependent keys in a packet data network H04L63/068)}
- H04L 9/0894: {Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage}
- H04L 2209/80: Wireless
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

An apparatus and a method for encrypting and decrypting data in a device are provided. The apparatus includes a processor and a memory. The processor is configured to transmit a data command from an application to an encryption driver that executes in a kernel space, determine if the application is authenticated to perform the data command based on an access policy, transmit, when the application is authenticated, a first key to a cryptographic library that executes in an application space, and perform the data command based on the first key after receiving a response via the cryptographic library. The first key is stored in an encryption driver in the kernel space and is not available to applications in the application space.

## Claims

### Claim 1

A method for encrypting and decrypting data in a device, the method comprising:
transmitting a data command from an application to an encryption driver that executes in a kernel space;
determining if the application is authenticated to perform the data command based on an access policy;
transmitting, when the application is authenticated., a first key to a cryptographic library that executes in an application space; and
performing the data command based on the first key after receiving a response from a response via the cryptographic library.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
determining if the data command corresponds to a write command to write encrypted data or a read command to read encrypted data,
wherein, if the data command corresponds to a write command, the first key corresponds to a public key, and
wherein, if the data command corresponds to a read command, the first key corresponds to a private key.

### Claim 3 (depends on 2)

The method of claim 2, further comprising:
if the data command corresponds to the read command, determining if the first key is available,
wherein the first key is unavailable when in a locked state and is available when in an unlocked state.

### Claim 4 (depends on 3)

The method of claim 3, further comprising:
if the data command corresponds to the write command, determining if the data command corresponds to a command to write sensitive data while in a locked state;
if the data command corresponds to the command to write the sensitive data while in the locked state, generating a second key and encrypting the sensitive data using the second key;
in response to transitioning from the locked state to the unlocked state, decrypting the encrypted sensitive data; and
merging the sensitive data with related sensitive data.

### Claim 5 (depends on 3)

The method of claim 3, further comprising:
when in the locked state, receiving access information to transition from the locked state to the unlocked state;
determining if the access information is sufficient to enter the unlocked state; and
if the access information is sufficient to enter the unlocked state, unlocking the device and generating the private key based on the access information.

### Claim 6 (depends on 5)

The method of claim 5, further comprising:
in response to a command to transition from the unlocked state to the locked state, discarding the private key and cache entries related to the private key.

### Claim 7 (depends on 1)

The method of claim 1,
wherein the transmitting of the first key to the cryptographic library comprises:
transmitting the first key from the encryption driver to a library connector that executes in the application space, and
transmitting the first key from the library connector to the cryptographic library; and
wherein the transmitting of the response from the cryptographic library to the encryption driver comprises:
transmitting the response from the cryptographic library to the library connector, and
transmitting the response from the library connector to the encryption driver.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
transmitting a device encryption key (DEK) and an encrypted DEK to the application,
wherein the application performs the data command based on the DEK and the encrypted DEK.

### Claim 9 (depends on 1)

The method of claim 1, wherein the access policy is determined by an owner of the device.

### Claim 10

A device for encrypting and decrypting data stored therein, the apparatus comprising:
a memory; and
a processor configured to:
transmit a data command from an application to an encryption driver that executes in a kernel space,
determine if the application is authenticated to perform the data command based on an access policy,
transmit, when the application is authenticated, a first key to a cryptographic library that executes in an application space, and
perform the data command based on the first key after receiving a response via the cryptographic library.

### Claim 11 (depends on 10)

The device of claim 10,
wherein the processor is further configured to determine if the data command corresponds to a write command to write encrypted data or a read command to read encrypted data,
wherein, if the data command corresponds to a write command, the first key corresponds to a public key, and
wherein, if the data command corresponds to a read command, the first key corresponds to a private key.

### Claim 12 (depends on 11)

The device of claim 11,
wherein the processor is further configured to determine if the first key is available when the data command corresponds to the read command, and
wherein the first key is unavailable when in a locked state and is available when in an unlocked state.

### Claim 13 (depends on 12)

The device of claim 12, wherein the processor is further configured to:
if the data command corresponds to the write command, determine if the data command corresponds to a command to write sensitive data while the device is in a locked state;
if the data command corresponds to the command to write the sensitive data while the device is in the locked state, generate a second key and encrypting the sensitive data using the second key;
in response to transitioning from the locked state to the unlocked state, decrypt the encrypted sensitive data; and
merge the sensitive data with related sensitive data.

### Claim 14 (depends on 14)

The device of claim 14, wherein the processor is further configured to:
when in the locked state, receive access information to unlock the device from the locked state to the unlocked state;
determine if the access information is sufficient to enter the unlocked state; and
if the access information is sufficient to enter the unlocked state, transition to the unlocked state and generate the private key based on the access information.

### Claim 15 (depends on 14)

The device of claim 14, wherein the processor is further configured to discard the private key and cache entries related to the private key in response to a command to transition from the unlocked state to the locked state.

### Claim 16 (depends on 10)

The device of claim 10,
wherein, when transmitting of the first key to the cryptographic library, the processor is further configured to:
transmit the first key from the encryption driver to a library connector that executes in the application space, and
transmitting the first key from the library connector to the cryptographic library, and
wherein, when transmitting of the response from the cryptographic library to the encryption driver, the processor is further configured to:
transmit the response from the cryptographic library to the library connector, and
transmit the response from the library connector to the encryption driver.

### Claim 17 (depends on 10)

The device of claim 10,
wherein the processor is further configured to transmit a device encryption key (DEK) and an encrypted DEK to the application, and
wherein the application performs the data command based on the DEK and the encrypted DEK.

### Claim 18 (depends on 10)

The device of claim 10, wherein the access policy is determined by an owner of the device.

### Claim 19

A non-transitory computer-readable storage medium storing instructions that, when executed, cause at least one processor to:
transmit a data command from an application to an encryption driver that executes in a kernel space;
determine if the application is authenticated to perform the data command based on an access policy;
transmit, when the application is authenticated, a first key to a cryptographic library that executes in an application space; and
perform the data command based on the first key after receiving a response via the cryptographic library.

### Claim 20 (depends on 19)

The non-transitory computer-readable storage medium of claim 19, wherein the cryptographic library includes a certificate from a security source indicating that the cryptographic library meets security requirements of the security source.
