
A given square is rotated on its center point by 'z' degrees. A new square is added inside this at no angle, whose size is based on the perimeter of the containing square.
Is there a way to calculate my black square's dimensions, given the angle that the blue square was rotated by and blue's dimensions?

The answer is surprisingly simple: $$s = \frac{L}{\cos \theta + \sin \theta},$$ for a enclosing square's side length of $L$ and an angle of rotation $\theta$ between $0$ and $\pi/2$ radians. But I will leave it to you to obtain the derivation of this result.