13.08.2012 Views

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>ACTIONSCRIPT</strong> 3.0 DEVELOPER’S GUIDE<br />

Security<br />

More Help topics<br />

Android: Security and Permissions<br />

Encrypted data on Android<br />

AIR applications on Android can use the <strong>en</strong>cryption options available in the built-in SQL database to save <strong>en</strong>crypted<br />

data. For optimum security, base the <strong>en</strong>cryption key on a user-<strong>en</strong>tered password that is <strong>en</strong>tered wh<strong>en</strong>ever the<br />

application is run. A locally stored <strong>en</strong>cryption key or password is difficult or impossible to “hide” from an attacker who<br />

has access to the application files. If the attacker can retrieve the key, th<strong>en</strong> <strong>en</strong>crypting the data does not afford any<br />

additional protection beyond the user ID-based filesystem security provided by the Android system.<br />

The EncryptedLocalStore class can be used to save data, but that data is not <strong>en</strong>crypted on Android devices. Instead,<br />

the Android security model relies on the application user ID to protect the data from other applications. Applications<br />

that use a shared user ID and which are signed with the same code signing certificate use the same <strong>en</strong>crypted local<br />

store.<br />

Important: On a rooted phone, any application running with root privileges can access the files of any other application.<br />

Thus, data stored using the <strong>en</strong>crypted local store is not secure on a rooted device.<br />

Security on iOS devices<br />

On iOS AIR conforms to the native security model. At the same time, AIR maintains its own security rules, which are<br />

int<strong>en</strong>ded to make it easy for developers to write secure, Internet-connected applications.<br />

Since AIR applications on iOS use the iOS package format, installation falls under the iOS security model. The AIR<br />

application installer is not used. Furthermore, a separate AIR runtime is not used on iOS devices. Every AIR<br />

application contains all the code needed to function.<br />

Application signatures<br />

All application packages created for the iOS platform must be signed. Since AIR applications on iOS are packaged in<br />

the native iOS IPA format, they are signed in accordance with iOS requirem<strong>en</strong>ts rather than AIR requirem<strong>en</strong>ts. While<br />

iOS and AIR use code signing in a similar fashion, there are significant differ<strong>en</strong>ces:<br />

On iOS, the certificate used to sign an application must be issued by Apple; Certificates from other certificate<br />

authorities cannot be used.<br />

On iOS, Apple-issued distribution certificates are typically valid for one year.<br />

Background image privacy<br />

Wh<strong>en</strong> a user switches an application to the background on iOS, the operating system captures a scre<strong>en</strong>shot that it uses<br />

to animate the transition. This scre<strong>en</strong>shot is stored in device memory and can be accessed by an attacker in physical<br />

control of the device.<br />

If your application displays s<strong>en</strong>sitive information, you should guard against such information being captured by the<br />

background scre<strong>en</strong>shot. The deactivate ev<strong>en</strong>t dispatched by the NativeApplication object signals that an application<br />

is about to switch to the background. Use this ev<strong>en</strong>t to clear or hide any s<strong>en</strong>sitive information.<br />

Last updated 6/6/2012<br />

1084

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!