\LoadClass[12pt]{article}
\ProvidesClass{homework}

\RequirePackage{ifthen}
\RequirePackage{fancyhdr}
\RequirePackage{amsmath,amsthm,amsfonts,amssymb}
\RequirePackage[letterpaper,margin=1in]{geometry}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}{Corollary}
\newtheorem{lemma}{Lemma}
\newtheorem{proposition}{Proposition}
\newtheorem{conjecture}{Conjecture}
\newtheorem{claim}{Claim}
\theoremstyle{definition}
\newtheorem{defn}{Definition}
\newtheorem{property}{Property}
\newtheorem{example}{Example}
\theoremstyle{remark}
\newtheorem{remark}{Remark}

\newcommand{\studname}[1]{\gdef\@studname{#1}}
\newcommand{\studuni}[1]{\gdef\@studuni{#1}}
\newcommand{\hwNo}[1]{\gdef\@hwNo{#1}}
\newcommand{\collab}[1]{\gdef\@collab{#1}}





% Helpful shorthands. Feel free to add more.
\newcommand{\share}{\mbox{\tt Share}}
\newcommand{\rec}{\mbox{\tt Reconstruct}}
\newcommand{\M}{{\cal M}}
\newcommand{\tofn}{$t$-out-of-$n$} 
\newcommand{\zo}{\{0,1\}}
\newcommand{\zoell}{\{0,1\}^\ell}
\newcommand{\zon}{\{0,1\}^n}
\newcommand{\zok}{\{0,1\}^k}
\newcommand\xor{\oplus}
\newcommand{\gen}{\mbox{\tt Gen}}
\newcommand{\enc}{\mbox{\tt Enc}}
\newcommand{\dec}{\mbox{\tt Dec}}

\newcommand{\sign}{\mbox{\tt Sign}}
\newcommand{\mac}{\mbox{\tt Mac}}  
\newcommand{\ver}{\mbox{\tt Ver}}


\newcommand{\Z}{{\mathbb Z}}
\newcommand{\Zp}{{\mathbb Z}_p}
\newcommand{\Zn}{{\mathbb Z}_n}
\newcommand{\ZN}{{\mathbb Z}_N}
\newcommand\moda[1]{\mbox{\rm \ (mod $#1$)}}
\newcommand{\modp}{\mbox{\rm \ (mod $p$)}}
\newcommand{\modn}{\mbox{\rm \ (mod $n$)}}
\newcommand{\modpp}{\mbox{\rm \ (mod $p-1$)}}



\newcommand*\concat{\mathbin{\|}}






\def\ddefloop#1{\ifx\ddefloop#1\else\ddef{#1}\expandafter\ddefloop\fi}

% \bbA, \bbB, ...
\def\ddef#1{\expandafter\def\csname bb#1\endcsname{\ensuremath{\mathbb{#1}}}}
\ddefloop ABCDEFGHIJKLMNOPQRSTUVWXYZ\ddefloop

% \cA, \cB, ...
\def\ddef#1{\expandafter\def\csname c#1\endcsname{\ensuremath{\mathcal{#1}}}}
\ddefloop ABCDEFGHIJKLMNOPQRSTUVWXYZ\ddefloop

% \vA, \vB, ..., \va, \vb, ...
\def\ddef#1{\expandafter\def\csname v#1\endcsname{\ensuremath{\boldsymbol{#1}}}}
\ddefloop ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\ddefloop

% \valpha, \vbeta, ...,  \vGamma, \vDelta, ...,
\def\ddef#1{\expandafter\def\csname v#1\endcsname{\ensuremath{\boldsymbol{\csname #1\endcsname}}}}
\ddefloop {alpha}{beta}{gamma}{delta}{epsilon}{varepsilon}{zeta}{eta}{theta}{vartheta}{iota}{kappa}{lambda}{mu}{nu}{xi}{pi}{varpi}{rho}{varrho}{sigma}{varsigma}{tau}{upsilon}{phi}{varphi}{chi}{psi}{omega}{Gamma}{Delta}{Theta}{Lambda}{Xi}{Pi}{Sigma}{varSigma}{Upsilon}{Phi}{Psi}{Omega}{ell}\ddefloop

\let\Oldmaketitle\maketitle
\renewcommand{\maketitle}
{
	\begin{titlepage}
    \begin{center}
			\vspace*{3cm}
	    
			\Huge
	    \textbf{COMS W4261}
			
			\LARGE
			\textbf{Introduction to Cryptography (Spring 2022)}
			
			\vspace{1cm}
      
			Problem Set \#\@hwNo
			
			\vspace{2cm}
			
			\Large
			\textit{\@studname \  (\@studuni)}
			
			\vfill
			
			\large
			Discussants: \texttt{\@collab}%
			
			\vspace{1cm}
			
			\today
	  \end{center}
	\end{titlepage}
}

\let\Oldsection=\section
\renewcommand*{\section}{
	\newpage
	\Oldsection
}

\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\fancyfoot[L]{COMS W4261 SP22 - PSET \#\@hwNo}
\fancyfoot[R] {\thepage}
\renewcommand{\headrulewidth}{0pt}


\renewcommand{\footrulewidth}{0.4 pt}
\setlength{\headheight}{15pt}

\endinput
