B ۋ\ @sXddlZddlZddlZGdddZGdddZGdddeZGdd d eZdS) Nc@sneZdZddZdddZddZedd Zed d Zed d Z ee e dddZ ddZ ddZdS)SchemecCsd|_d|_g|_dS)N)typenameimplementations)selfr)rrtitler)rrrr__repr__@szScheme.__repr__N)r )__name__ __module__ __qualname__r r r staticmethodrrr"strlistrr3r6rrrrrs     rc@seZdZddZddZdedddZedd d Zegdd d Zegdd dZ egdddZ e ddZ e e edddZddZddZddZdS)ImplementationcCs||_||_dS)N)rr)rrrrrrr FszImplementation.__init__cCs.x(|jdD]}|d|jkr|SqWdS)Nrr)rr3r)rirrrr3JszImplementation.metadata..)r#cCstj|jj|d|jS)N)r)r r rrr)rrrrrr OszImplementation.pathcCs.tjdkrd|jj|jSd|jj|jS)Nntz lib{}_{}.libz lib{}_{}.a)r rrr)rrrrlibnameRs zImplementation.libnamecCsttj|dS)Nz*.c)globr r r)rrrrcfilesWszImplementation.cfilescCsttj|dS)Nz*.h)rBr r r)rrrrhfilesZszImplementation.hfilescCs&ttj|tjdkrdndS)Nr@z*.oz*.obj)rBr r rr)rrrrofiles]szImplementation.ofilescCs2t|}x|jD]}|j|kr|SqWtdS)N)rrrrr)rZimplementation_namerimplementationrrrras    zImplementation.by_name)rr#cCsJg}x@t|D].}tjtj||r|t||qW|S)N)r r%r r$rr&r=)rrr+rrrr"is z"Implementation.all_implementationscCs d|j|jddS)Nz{}{}_rr)rrrrrr)rrrrrqs zImplementation.namespace_prefixcCsd|j|jjS)Nz{} implementation of {})rrr)rrrr__str__uszImplementation.__str__cCsd|jj|jS)Nz)rrr)rrrrr6xszImplementation.__repr__N)r?)r7r8r9r r3r;r rArCrDrEr:rrr<r"rrGr6rrrrr=Ds r=c@s,eZdZedddZeedddZdS)r')rcCsd|_||_t||_dS)Nr)rrr=r"r)rrrrrr ~sz KEM.__init__)r#cCs tdS)Nr)rrrrrrall_kemssz KEM.all_kemsN)r7r8r9r;r r:r<rHrrrrr'|sr'c@s&eZdZedddZeddZdS)r()rcCsd|_||_t||_dS)Nr)rrr=r"r)rrrrrr szSignature.__init__cCs tdS)Nsig)rrrrrrall_sigsszSignature.all_sigsN)r7r8r9r;r r:rJrrrrr(sr()r rBr.rr=r'r(rrrrs >8