(Bloomberg) — Oracle Corp. is weighing a proposal for a sale of TiKTok’s US operations that would have it provide security assurances and take a small stake in a new American entity while potentially leaving the app’s influential algorithm in Chinese hands, according to people familiar with the matter.

Most Read from Bloomberg

A proposal was circulated within the Trump administration last week that would have Oracle work with US buyers to vouch for the safety of users’ data, according to the people, who discussed the plan on condition of anonymity citing its confidentiality. That would include guarantees that an updated US version of TikTok would not contain a back door that China’s government could exploit, they said.

The plan is emerging with less than three weeks to reach a deal to avert a TikTok ban under a US law requiring its Chinese owner ByteDance Ltd. to divest in the name of protecting national security. President Donald Trump issued an order on his first day in office delaying enforcement until April 5 to buy time for a deal, and he has called for a sale that would let TikTok keep operating in the US.

Oracle already works with TikTok to secure US user data as part of a partnership called Project Texas, and it’s unclear what else would change about the app or its communication with Beijing-based ByteDance under the proposal. The proposal is still tentative and details could change, the people said.

Any deal would require approval not only from Trump, but from TikTok’s parent and the Chinese government. Letting ByteDance retain the algorithm would make it easier to win over the company and Chinese authorities, but would risk failing to comply with the law signed last year by President Joe Biden. It would also leave unresolved US concerns that China could access sensitive data or use the app to spread propaganda — claims that ByteDance and officials in Beijing have previously rejected.

China’s government is aware of Oracle potentially providing a security backstop and taking a small stake, one person familiar with the matter said. Authorities in Beijing would likely accept a deal with Oracle’s involvement as long as TikTok’s algorithm remains fully under China’s control, the person said.

Spokespeople for Oracle and the White House didn’t respond to requests for comment. TiKTok declined to comment, and ByteDance’s representatives didn’t respond to a request for comment.