mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-01 05:49:10 +00:00
Make exosphere subdir, start outlining SE driver API.
This commit is contained in:
parent
e205ed70f8
commit
6c5d425528
3 changed files with 39 additions and 3 deletions
|
@ -4,5 +4,3 @@ Atmosphère-NX
|
|||
![License](https://img.shields.io/badge/License-GPLv2-blue.svg)
|
||||
|
||||
This is a placeholder repo reserved for any/all development work I do pertaining to customized firmware on the Nintendo Switch.
|
||||
|
||||
Currently, I do not know on what timeline commits to this repository will appear.
|
||||
|
|
6
exosphere/README.md
Normal file
6
exosphere/README.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
Exosphere
|
||||
=====
|
||||
|
||||
![License](https://img.shields.io/badge/License-GPLv2-blue.svg)
|
||||
|
||||
Exosphere is a Secure Monitor implementation for the Nintendo Switch.
|
32
exosphere/se.h
Normal file
32
exosphere/se.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
#ifndef EXOSPHERE_SE_H
|
||||
#define EXOSPHERE_SE_H
|
||||
|
||||
/* Exosphere driver for the Tegra X1 security engine. */
|
||||
|
||||
/* TODO: Define constants for the C driver. */
|
||||
|
||||
/* WIP, API subject to change. */
|
||||
|
||||
#define KEYSLOT_AES_MAX 0x10
|
||||
#define KEYSLOT_RSA_MAX 0x2
|
||||
|
||||
void set_security_engine_address(void *security_engine);
|
||||
|
||||
void set_aes_keyslot_flags(unsigned int keyslot, unsigned int flags);
|
||||
void set_rsa_keyslot_flags(unsigned int keyslot, unsigned int flags);
|
||||
void clear_aes_keyslot(unsigned int keyslot);
|
||||
void clear_rsa_keyslot(unsigned int keyslot);
|
||||
|
||||
void set_aes_keyslot(unsigned int keyslot, const char *key, unsigned int key_size);
|
||||
void crypt_data_into_keyslot(unsigned int keyslot, )
|
||||
void set_rsa_keyslot(unsigned int keyslot, const char *modulus, unsigned int modulus_size, const char *exp, unsigned int exp_size);
|
||||
void set_aes_keyslot_iv(unsigned int keyslot, const char *iv, unsigned int iv_size);
|
||||
void set_se_ctr(const unsigned int *ctr);
|
||||
|
||||
void se_crypt_aes(unsigned int keyslot, char *dst, unsigned int dst_size, const char *src, unsigned int src_size, unsigned int config, unsigned int mode, unsigned int (*callback)(void));
|
||||
void se_exp_mod(unsigned int keyslot, char *buf, unsigned int size, unsigned int (*callback)(void));
|
||||
|
||||
/* TODO: SE context save API, consider extending AES API for secure world vs non-secure world operations. */
|
||||
/* In particular, smc_crypt_aes takes in raw DMA lists, and we need to support that. */
|
||||
|
||||
#endif /* EXOSPHERE_SE_H */
|
Loading…
Reference in a new issue