Huawei Mobile Services (HMS) Security Technical
Huawei Mobile Services (HMS) Security Technical
Paper V2.0
Issue V2.0
Date 2021-12-31
Website: https://consumer.huawei.com/en/
PSIRT Email: PSIRT@huawei.com
Fax: +86-0769-23839866
Contents
1 Introduction ..................................................................................................................... 1
1.1 Security & Privacy Protection Are Huawei's Top Priorities .................................................................. 1
5 Network Security........................................................................................................... 11
5.1 Secure Transmission Channel ........................................................................................................... 11
5.2 Cloud Network Border Protection ...................................................................................................... 11
5.3 VPN-based Fine-grained Security Protection .................................................................................... 12
5.4 Host and Virtualization Container Protection ..................................................................................... 13
5.5 Multi-layer Intrusion Prevention.......................................................................................................... 13
5.6 Zero Trust Architecture ...................................................................................................................... 14
5.7 Vulnerability Management.................................................................................................................. 14
5.8 Operation Audit .................................................................................................................................. 14
1 Introduction
2 HarmonyOS-based Security
HarmonyOS provides security measures for protecting consumer and developer data
throughout the data lifecycle, and takes into account personal data sensitivity level,
system data importance, and app data asset value. With the device security level
system, all data is assigned an appropriate security level when it is generated, and
appropriate access control permissions and policies are adopted for the data based
on its security level throughout the data lifecycle. During data storage, appropriate
encryption measures are adopted for different data security levels, and during data
transmission, the system prohibits the transfer of highly sensitive data to devices with
low security capabilities. In addition, devices with low security capabilities are not
allowed to deliver instructions for controlling highly sensitive resources and
peripherals.
For more information about HarmonyOS-based security, please refer to the
HarmonyOS security technology whitepaper at
https://consumer.huawei.com/en/privacy/whitepaper/.
the public key to deliver the symmetric key used for encrypting the song content
and uses the symmetric key to encrypt the content to be transmitted to the
device. After receiving data, the device uses its unique key to decrypt the song.
Different devices use different keys to ensure that the copyrighted data is not
accessed without authorization.
● Certain products without independent authentication UIs, such as kids watches,
also use protected authentication keys for trusted communication with a server.
● Service configurations to be protected, such as authentication credentials
between services, are also encrypted using the encryption key.
ensure the security and integrity of the pass. Verified pass information is written
into HUAWEI Wallet and can be used by users.
● During the initialization of the digital rights management (DRM) client, the device
certificate of the mobile phone is submitted to the cloud for verification to obtain
the DRM client certificate. The CCS issues a unique DRM client certificate to
each device. When DRM is used on mobile phones to safeguard digital content
such as audio and video content, DRM uses certificates to encrypt content keys.
This ensures that only authorized devices and apps can obtain the content keys,
preventing digital content from being leaked.
4.4 TCIS
When a user signs in to a HUAWEI ID on a Huawei device for the first time, a key
pair (consisting of a public key and a private key) is automatically generated for
establishing a trust circle. The public key is uploaded to the trust circle index service
(TCIS) server. When a user signs in to multiple devices through the same HUAWEI
ID, a list of public keys is generated for this HUAWEI ID on the TCIS server. This list
is a trust circle, and the server protects its integrity. The trust circle is sent to each
device for integrity check.
When users subscribe to the HUAWEI Mobile Cloud service, the server randomly
generates a user-level key for each user. When files are uploaded to HUAWEI Mobile
Cloud, the device generates a file encryption key for each file to encrypt the file
content, preventing such content from being stolen during transmission and storage.
A file encryption key is encrypted using the user-level key and then uploaded to and
stored on the server.
When a user uses Huawei Share to transfer files, the key pair in the trust circle is
used to authenticate the device identity and establish a secure transmission channel
between devices. After a device passes identity authentication, a temporary key is
generated through negotiation to implement encrypted data transmission and
integrity protection.
5 Network Security
● On the management plane, access control based on secure VPN and HTTPS
channels is implemented throughout the process, including sign-in
authentication, permission management, and access control.
● Access management: Systems are centrally managed on the network using
identity accounts and two-factor authentication, such as dynamic SMS
verification codes and USB keys. To comprehensively audit user sign-ins and
operations, accounts are used to sign in to the virtual private network (VPN),
bastion host, and jump server.
● Permission management: Role-based access control (RBAC) is implemented
based on various services, as well as different responsibilities of the same
service. In accordance with the minimum authorization principle, only necessary
permissions are assigned to users. The scope of the sign-in permissions
includes the core network, access network, security device, service system,
database system, hardware maintenance, detection and maintenance, and
more. Personnel can only access devices within their authority.
6 Service Security
1. The key management system (KMS) generates user keys, and exports the keys
based on user key seeds and other related key materials.
2. The KMS generates a key for each user, and the app can only obtain the key of
a user using the user's valid identity, preventing key leakage.
3. User data is encrypted using file keys through the block cipher on mobile phones
before being uploaded to the cloud storage server. This means that plaintext
data will not be transferred out of mobile phones.
4. The key used for encrypting data is encrypted using the user key before being
uploaded to the cloud server to ensure secure transmission and storage.
Huawei Pay and IAP have obtained PCI-DSS certification, ADSS certification of
China UnionPay, and BCTC certification.
Manual recheck: All apps to be launched on HUAWEI AppGallery are tested by the
dedicated security test team for HUAWEI AppGallery on actual devices in real-world
scenarios. The team is regularly trained and study state-of-the-art security test
methodologies to improve their testing capabilities. The security tests cover all
Huawei device types as well as OS versions to ensure compatibility of the apps with
all the devices. In addition, the apps are tested in various real-world scenarios.
Integrity check: The SHA256 information digest algorithm is used to verify the
integrity of an app installation package by checking the consistency between the
digest value of the uploaded installation package and of the downloaded installation
package. App installation packages that are uploaded in blocks are verified in real
time during download. An app installation package that is uploaded as a whole is
verified after download.
Signature verification: Only apps with complete developer signatures can be installed
in HarmonyOS. App signatures can be used to verify the integrity and legitimacy of
the source of apps. The system verifies the signature of an app to check whether it
has been tampered with before installing the app. Apps that fail this verification
cannot be installed. The system also verifies app signatures before updating pre-
installed or user-installed apps. Such an app can only be updated when the signature
of the updated version is the same as the existing signature. This prevents malicious
apps from replacing existing verified ones through updates.
Threat detection: Security risks may exist in apps due to unknown third parties, and
downloading apps from unverified sources may bring with them malicious security
threats. It is recommended that default security settings be retained to prevent
unnecessary risks. HarmonyOS has an industry-leading built-in antivirus engine,
which is used to detect viruses in user-installed apps. The system supports local and
online virus scanning and removal, to ensure that app risks are identified regardless
of whether user devices are connected to the Internet. The antivirus engine can scan
viruses during app installation and in the backend. Once a virus is detected, a risk
warning is displayed, prompting users to handle the virus.
AI security defense: HarmonyOS provides an AI computing platform for device
security protection. It has a built-in industry-leading AI antivirus engine encompassing
a security defense-oriented AI model that is built upon deep learning and training.
HarmonyOS observes the behavior of unknown app software in real time to identify
new viruses, new variants of existing viruses, and dynamic loading of malicious
programs, and runs the AI model on devices to analyze the activity sequence of
unknown software. This quickly and effectively detects threats and improves app
threat detection capabilities. Once a malicious app is detected using AI security
defense, the system will immediately generate a warning to prompt the user to
handle the app. (This function is available only for certain chip models.)
App sandbox: HarmonyOS provides an app sandbox mechanism, which enables all
apps to run in isolation within the sandbox to ensure runtime security. When an app
is installed, the system allocates a private storage directory to the app, which cannot
be accessed by other apps, ensuring static data security. The sandbox isolation
technology protects the system and apps against attacks from malicious apps. The
system allocates a unique user identity (UID) to each app and builds an app sandbox
based on UIDs. The sandbox provides multiple kernel access control mechanisms,
such as discretionary access control (DAC) and mandatory access control (MAC), to
restrict apps from accessing files and resources outside the sandbox. By default, all
apps are sandboxed. To access information outside the sandbox, an app needs to
use services provided by the system or exposed interfaces of other apps and obtain
the required permissions, without which the system will deny access to apps. Apps
with the same signature can share a UID, and share code and data in the same
sandbox.
Runtime memory protection: Malicious apps usually obtain memory addresses by
viewing the memory if the allocated memory addresses are relatively fixed during app
operation. HarmonyOS provides ASLR and data execution prevention (DEP) to
prevent attackers from exploiting memory vulnerabilities.
Regular app retest: Security scans and retests are performed on released apps every
month to identify and remove apps with security issues. The security operation team
periodically updates the sensitive word library, with focus on hot events, and handles
apps that control malicious behavior through developers' cloud environment.
Universal supervision: Users can report apps with security issues through HUAWEI
AppGallery, contacting customer service, or other channels. HUAWEI AppGallery
staff will handle such apps promptly after verification.
whether the signing certificate fingerprint of the kit is added to the trustlist prior to an
update. If not, the kit cannot be loaded. If the fingerprint is in the trustlist, the APK
signature is verified. An overwrite update is allowed only after the signature
verification is successful.
8.1.3 Service DR
HMS Core servers are deployed in multi-site disaster recovery (DR) mode. The
database is deployed in active-standby mode, and data is periodically synchronized
from the active database to the standby database. Dedicated lines are used to
safeguard the data transmission between the production site and DR site. During a
DR failover of the HMS Core server, domain name service (DNS) is used to switch
service traffic to the DR site. DR drills are regularly conducted to ensure availability of
the DR site.
8.2.2 Anti-fraud
In business scenarios such as flash sales, coupons, gift packages, and lottery
drawing, attackers may attempt to register a large number of fake user accounts in
batches through various channels to participate in such campaigns and receive
benefits. During registration, Account Kit detects fake accounts based on specialized
rules, machine learning, and various factors such as operation exceptions,
suspicious mobile phone numbers and email addresses, and risky networks, to
prevent registrations of fake user accounts and mitigate risks to back-end services.
After a developer app is integrated with Account Kit, the developer app can subscribe
to the HUAWEI ID risk status synchronization API on the server. After identifying a
fake user account, the system immediately notifies the developer app, which has a
HUAWEI ID signed in, through the risk status synchronization API to enable the
developer app to promptly respond to the issue.
Push Kit provides precise messaging for developers. Each app is assigned a
different AAID for data isolation among apps. Once messages are successfully sent,
Huawei will immediately delete the messages.
8.4 IAP
IAP is available for global developers and provides unified and simple offering
management, offering ordering and purchase, and service delivery capabilities for
developers.
information, each user group contains no fewer than 5000 users. If a user enables
the Disable personalized ads setting, all vendors including Huawei cannot obtain
the advertisement ID of the user's device and therefore cannot push personalized
ads to the user. In addition, ad placement is disabled for minors.
HUAWEI Mobile Cloud can be accessed only by the user, and shared files can be
accessed only by authorized users. In addition, file-level keys are used to encrypt the
stored files to prevent data leakage.
Leaderboard, achievement, event, and player statistics are sent to the HMS Core
server for storage, and data stored is isolated by app ID. That is, an app can access
its own data only by ID.
After game records are uploaded to the HMS Core server using HTTPS, the records
are stored in isolation by user and app, and are encrypted using AES in two-layer
encryption mode. The key of the first layer (file encryption key) is derived from the
attribute value of a file and is used to encrypt the file; the key of the second layer
(user encryption key) is derived from a user attribute value and is used to encrypt the
key of the first layer. This ensures that users can use only their own encryption keys
to encrypt their game data for storage.
management through HUAWEI Wallet's Card Store, AI Tips, and HUAWEI Push
Service.
8.11 FIDO
Fast Identity Online (FIDO) is an open service for quick online identity authentication.
It provides BioAuthn (local biometric authentication) and FIDO2 (online user identity
authentication) capabilities, which provide secure, easy-to-use, and password-free
authentication service for developers.
8.11.2 FIDO2
FIDO2 provides the following features:
1. Implements Android-based password-free user authentication via a FIDO2-
compliant client as well as a platform authenticator for local biometric
authentication. The FIDO2 specification includes Client to Authenticator
Protocols (CTAP) and W3C WebAuthn.
2. Completes user authentication via communication modes like USB, NFC, and
Bluetooth Low Energy (BLE) to communicate with FIDO security key devices.
3. Provides an SDK for Android app developers.
4. Provides web app developers with the WebAuthn JavaScript APIs which are
offered via the integration with HUAWEI Browser.
5. Allows use of a mobile phone with the biometric authentication capability to act
as the FIDO security key, for seamless user authentication on other devices.
6. Before processing a request, the FIDO2 client calls the SysIntegrity API of
Safety Detect to check whether the device where the app runs is secure. If the
device is secure, the FIDO2 client continues to process the request. Otherwise,
the client returns an error indicating that the device has failed the system
integrity check.
WisePlay DRM server and WisePlay DRM client, to ensure that the messages will
not be tampered with by man-in-the-middle attacks during transmission.
8.13 ML Kit
ML Kit provides vision and language services for developers based on machine
learning technology. Vision services include AI-empowered ones such as text
recognition, face detection, image classification, object detection and tracking,
landmark recognition, and image segmentation. Language services include speech
recognition, language detection, and translation.
every 10 minutes and shared via Bluetooth among mobile phones where Contact
Shield is enabled. After the public health institution announces a person has tested
positive for COVID-19, Contact Shield will notify the user of whether they have been
exposed to the confirmed case. Contact Shield will not use users' location
information, nor collect or share users' identity information. Users can switch Contact
Shield on or off, and manually delete all data records.
Site Kit stores anonymized search data only with users' consent to improve its
service. In other scenarios, Site Kit does not collect or process personal information.
Huawei cannot obtain users' place search and access records, and cannot track or
identify user locations. Huawei will not disclose personal information to third parties.
Analytics Kit assigns a unique AAID to each device. It does not collect persistent
identifiers such as IMEIs and SNs. Developers' data will not be used for any other
purposes or shared with third parties without their consent. An automation interface is
used to uphold data subjects' rights and obligations, including the right of access,
right to object, and right to erasure.
identifier, or invoice) to the DTM server. In addition, we may collect and process
information about how DTM is used for the purpose of improving and maintaining
DTM. We will not share the information with third parties without the developer's
consent, unless those third parties are operating under contract and acting on our
behalf.
8.20.1 Anti-spoofing
DTM verifies DTM server certificates to ensure that the dynamic tag code to be
updated or downloaded is from a trusted DTM server. DTM verifies a certificate's
issuer, validity period, domain name, and other information, to prevent the server
from being spoofed.
8.23 Keyring
Keyring offers the Credentials Management API for storing user credentials on user
devices and sharing them across different apps and platforms, helping developers
create a seamless sign-in experience.
9 Privacy Control
exchange; (d) other technologies used during transmission, service processing, and
storage, such as E2E encryption, trust relationship authentication for the certificate
chain, signature to prevent data tampering, and mutual trust between devices in a
trust circle.
We protect user data from unauthorized access and tampering regardless of whether
the data is stored on the cloud or transmitted over the network.
10.4 CC Certification
Common Criteria (CC) certification is a product information security certification
recognized in 31 countries and regions, and encompasses seven levels (EAL1 to
EAL7). A higher level indicates a stricter review process and, consequently, tighter
product security.
Huawei's TEE OS kernel obtained CC EAL5+ in September 2019. EAL5+ is a
commercial OS kernel security certification, indicating that sensitive data, such as
fingerprints, facial data, and lock screen passwords, of Huawei mobile phone users
during app use is properly protected.
11 Oriented Future
Standard
DEP Data Execution Prevents code from being run from a
Prevention specific part of memory in order to protect
computers.
DMZ Demilitarized zone A buffer area between an insecure system
and a secure system.
DPA Data processing A security and privacy agreement signed
agreement between a data controller and a data
processor, or between a data processor
and a data sub-processor, which specifies
the responsibilities and obligations of both
parties in the processing of personal data.
DRM Digital rights A technology that offers enhanced
management protection of the copyright of digital audio
and video programs, documents, and
ebooks.
DTM Dynamic Tag Offers a dynamic tag management system
Manager that helps developers quickly configure
and update tracking tags and related code
snippets on a web-based UI. They can
then track specific events and report data
to third-party analytics platforms,
monitoring their marketing data as
needed.
ECC Elliptic curves An approach to public-key cryptography
cryptography based on the algebraic structure of elliptic
curves.
EMUI Emotion UI An Android-based OS developed by
Huawei.
FIPS Federal Information A set of standards used by American
Processing government agencies for automated data
Standards processing and remote communications.
GCM Galois/Counter A mode of operation for symmetric-key
Mode cryptographic block ciphers.
GDPR General Data Any organization that collects, transfers,
Protection retains, or processes personal information
Regulation in any EU member state is subject to this
Regulation.
HarmonyOS HarmonyOS A next-generation OS for smart devices.
HDCP High-bandwidth Protects uncompressed digital audio and
Digital Content video content.
Protection
HDMI High-definition A fully digital audio/video interface for
multimedia interface transmitting uncompressed audio and
video signals.
module system.
SSL Secure Socket Layer Widely used for identity authentication and
encrypted data transmission between the
web browser and server. The data
encryption technology is used to prevent
data from being intercepted or
eavesdropped during transmission.
TCIS Trust circle index A TCIS server is a server component used
service to manage public key information in a
trusted service. All services are provided
in web mode based on the applicability of
the Internet.
TEE Trusted execution An OS and trusted apps running in a
environment secure world (such as TrustZone).
TLS Transport Layer Enables confidentiality and data integrity
Security between two apps.
VLAN Virtual local area A group of logical devices and users,
network which are organized based on functions,
departments, and applications, regardless
of their physical locations. Such devices
and users communicate with each other
as if they are on the same network
segment.
VPN Virtual private A private network established on a public
network network, and used for encrypted
communications.
XMPP Extensible A subset XML protocol based on Standard
Messaging and Generalized Markup Language.
Presence Protocol
XSS Cross-site scripting An attack that steals information from
users by exploiting website vulnerabilities.