Categorygithub.com/connesc/ctrsigcheck
modulepackage
0.2.1
Repository: https://github.com/connesc/ctrsigcheck.git
Documentation: pkg.go.dev

# README

ctrsigcheck

go.dev reference Go Report Card GitHub release License

Parse and verify various file formats used by the Nintendo 3DS, also known as CTR.

This repository contains both a CLI and a Golang library.

Rationale

The main goal is to check both integrity and authenticity of those files before installing them.

The integrity is established by verifying the file structure and embedded SHA-256 hashes.

While not mandatory, the authenticity can also be established thanks to Nintendo signatures. Those digital signatures can be verified using public Nintendo certificates, but cannot be generated without private keys that are only known by Nintendo.

CLI

Installation

The command-line tool can be found precompiled in the releases page.

Alternatively, it can be built and installed from source:

go get github.com/connesc/ctrsigcheck/cmd/ctrsigcheck

An AUR package is also available for Arch Linux users: ctrsigcheck-bin.

Usage

Parse and verify various file formats used by the Nintendo 3DS, also known as CTR

Usage:
  ctrsigcheck [command]

Available Commands:
  cia         Check CIA files
  help        Help about any command
  ticket      Check ticket files
  tmd         Check TMD files

Flags:
  -h, --help   help for ctrsigcheck

Use "ctrsigcheck [command] --help" for more information about a command.

Golang library

Check the go.dev reference.

License

ISC License

# Packages

No description provided by the author
Package ctrutil contains various utilities used by ctrsigcheck.

# Functions

CheckCIA reads the given CIA file and verifies its content.
CheckTicket reads the given ticket file and verifies its content.
CheckTMD reads the given TMD file and verifies its content.
DecodeIconImage as found in a SMDH file.
ParseExeFS extracts some information from the given ExeFS file.
ParseNCCH extracts some information from the given NCCH file.
ParseSMDH extracts some content from the given SMDH file.

# Variables

Certs contains the retail and debug certificates from Nintendo.

# Structs

Certificate used to verify digital signatures.
CertificateSet used to verify digital signatures of tickets and TMDs.
CIA describes a CIA file.
CIAContent describes a content section embedded in a CIA file.
CIAContentNCCH describes the NCCH structure of a content section embedded in a CIA file.
CIATicket describes the ticket embedded in a CIA file.
CIATMD describes the TMD embedded in a CIA file.
ExeFS describes the result of ExeFS parsing.
NCCH describes the result of NCCH parsing.
SMDH describes the result of SMDH parsing.
SMDHGraphics contains the PNG-encoded icons embedded in a SMDH file.
SMDHTitle describes a title section embedded in a SMDH file.
Ticket describes the content of a ticket file.
TitleKey describes the title key embedded in ticket.
TMD describes a TMD structure.
TMDContent describes a content record in a TMD.

# Type aliases

Hex wraps a []byte so that it encodes to hexadecimal.
Hex16 wraps an uint16 so that it encodes to hexadecimal.
Hex32 wraps an uint32 so that it encodes to hexadecimal.
Hex64 wraps an uint64 so that it encodes to hexadecimal.
Hex8 wraps an uint8 so that it encodes to hexadecimal.