Android 安全架构及权限控制机制剖析

简介: Android 是业界流行的开源移动平台,受到广泛关注并为多个手机制造商作为手机的操作系统平台,因此,研究其安全架构及权限控制机制具有非常的重要性。本文从 Android 层次化安全架构入手,详细地介绍 Android 平台的安全架构及其权限控制机制,涵盖 Android 应用程序权限申请方法等,并从源代码实现层面来解析该机制。

Android 层次化安全架构

Android 作为一个移动设备的平台,其软件层次结构包括了一个操作系统(OS),中间件(MiddleWare)和应用程序(Application)。根据 Android 的软件框图,其软件层次结构自下而上分为以下几个层次:

M2Crypto生成DSA及RSA密钥

DSA:

#!/usr/bin/env python
# -*- coding=utf-8 -*-
#author: xjump.me#at#gmail.com
#file: gendsa.py

from M2Crypto import DSA, BIO
dsa = DSA.gen_params(1024)
mem = BIO.MemoryBuffer()
dsa.gen_key()
dsa.save_key_bio(mem, cipher=None)
dsa.save_pub_key_bio(mem)
print mem.getvalue()

Lua 5.0的实现(中英文对照)

Author
Roberto Ierusalimschy (Department of Computer Science, PUC-Rio, Rio de Janeiro, Brazil roberto@inf.puc-rio.br)
Luiz Henrique de Figueiredo(IMPA-Instituto de Matematica Pura e Aplicada, Rio de Janeiro, Brazil lhf@impa.br)
Waldemar Celes(Department of Computer Science, PUC-Rio, Rio de Janeiro, Brazil celes@inf.puc-rio.br)

翻译: xjump.me#at#gmail.com, @xjump
原文: http://www.lua.org/doc/jucs05.pdf

Abstract  We discuss the main novelties of the implementation of Lua 5.0: its register-based virtaul machine, the new algorithm for optimizing tables used as arrays, the implementation of closures, and the addition of coroutines.
Key Words  compilers, virtual machines, hash tables, closures, coroutines
Category  D.3.4, D.3.3, D.3.2, E.2

摘要  我们讨论了Lua 5.0实现上的主要优点:基于寄存器的虚拟机,tables用于数组时新的优化算法,闭包的实现,以及协程。
关键字  编译器,虚拟机,Hash表,闭包,协程
类别  D.3.4,D.3.3,D.3.2,E.2

1 Introduct
1 介绍

Lua was born in an academic laboratory as a tool for in-house software development but somehow was adopted by several industrial projects around the world and is now widely used in the game industry. [1]
Lua诞生于一个学术实验室,当时是作为一个内部软件开发工具的,但逐渐被移植到了全世界的各个行业的工程中,而且现在广泛的用于游戏行业。[1]